from invirt.common import InvalidInput, CodeError
from view import View, revertStandardError
+import ajaxterm
static_dir = os.path.join(os.path.dirname(__file__), 'static')
else:
raise InvalidInput('back', back, 'Not a known back page.')
+ atmulti = ajaxterm.Multiplex()
+ atsessions = {}
+
+ @cherrypy.expose
+ @cherrypy.tools.mako(filename="/terminal.mako")
+ def terminal(self, machine_id):
+ machine = validation.Validate(cherrypy.request.login, cherrypy.request.state, machine_id=machine_id).machine
+
+ status = controls.statusInfo(machine)
+ has_vnc = hasVnc(status)
+
+ d = dict(on=status,
+ has_vnc=has_vnc,
+ machine=machine,
+ hostname=cherrypy.request.local.name)
+ return d
+
machine = MachineView()