From: Adam Glasgall Date: Fri, 15 Jun 2018 00:14:42 +0000 (-0400) Subject: Add Java Web Start for Java HVM console X-Git-Tag: 0.1.53~1 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/90e6fdb036e4b4c7415f9b0da0d206b5efec93d3 Add Java Web Start for Java HVM console Add Java Web Start support for Java HVM console as a stopgap until we have a proper JavaScript one, since browsers by and large don't have a Java plugin anymore. --- diff --git a/code/main.py b/code/main.py index 6587484..59a31f8 100755 --- a/code/main.py +++ b/code/main.py @@ -319,8 +319,20 @@ console will suffer artifacts. @cherrypy.expose @cherrypy.tools.mako(filename="/vnc.mako") + def vnc(self, machine_id): - """VNC applet page. + """VNC applet page""" + return self._vnc(machine_id) + + @cherrypy.expose + @cherrypy.tools.response_headers(headers=[('Content-Disposition', 'attachment; filename=vnc.jnlp')]) + @cherrypy.tools.mako(filename="/vnc_jnlp.mako", content_type="application/x-java-jnlp-file") + def vnc_jnlp(self, machine_id): + """VNC applet exposed as a Java Web Start app (JNLP file)""" + return self._vnc(machine_id) + + def _vnc(self, machine_id): + """VNC applet page functionality. Note that due to same-domain restrictions, the applet connects to the webserver, which needs to forward those requests to the xen diff --git a/code/templates/vnc.mako b/code/templates/vnc.mako index 9e39294..b7b6857 100644 --- a/code/templates/vnc.mako +++ b/code/templates/vnc.mako @@ -20,5 +20,5 @@ Console to ${machine.name} -You must have Java enabled in your browser to use the VNC console. +You must have Java enabled in your browser to use the VNC console applet. If your browser does not support Java, but you do have a Java Runtime Environment installed, try clicking here to launch the VNC console via Java Web Start. diff --git a/code/templates/vnc_jnlp.mako b/code/templates/vnc_jnlp.mako new file mode 100644 index 0000000..60f3269 --- /dev/null +++ b/code/templates/vnc_jnlp.mako @@ -0,0 +1,24 @@ + + + XVM Java Console + Invirt Project + Java Web Start Application + + + + + + + + + + + + + + + + + + + diff --git a/debian/changelog b/debian/changelog index 4dba5bd..58385e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +invirt-web (0.1.53~glasgall1) precise; urgency=medium + + * Add Java Web Start support for Java HVM console as a stopgap until we + have a proper JavaScript one, since browsers by and large don't have a + Java plugin anymore. + + -- Adam Glasgall Thu, 14 Jun 2018 20:11:44 -0400 + invirt-web (0.1.52) unstable; urgency=low * preseeds: Correct country string error; fixes mirror selection