From: Quentin Smith Date: Mon, 10 Aug 2009 00:13:20 +0000 (-0400) Subject: Use RESTful URLs for commands X-Git-Tag: 0.1.0^2~52 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/97a1b45c11a71728664e994cbcdca4801baa8635?ds=sidebyside Use RESTful URLs for commands svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2683 --- diff --git a/code/static/style.css b/code/static/style.css index 49fe8e2..a764e17 100644 --- a/code/static/style.css +++ b/code/static/style.css @@ -104,3 +104,7 @@ tr.stripedrow { #machinelist td, #machinelist th { padding: 0.1em 0.5em; } + +form { + display: inline; +} diff --git a/code/templates/info.mako b/code/templates/info.mako index 5af29bb..b98e7c2 100644 --- a/code/templates/info.mako +++ b/code/templates/info.mako @@ -26,24 +26,26 @@ Info on ${machine.name} VNC console not enabled; still booting? % endif % endif -
- - +<%def name="command_button(title, value, cdrom=False, extra='')"> + + + +% if cdrom: + Boot CD: ${self.fn.cdromList()} +% endif +
+
% if on: - - - + ${command_button("Power off", "destroy")} + ${command_button("Shutdown", "shutdown")} + ${command_button("Reboot", "reboot", cdrom=True)} % else: - + ${command_button("Power on", "create", cdrom=True)} % endif
- Boot CD: -${self.fn.cdromList()} -
-
- + ${command_button("Delete VM", "delete", extra='''onclick="return confirm('Are you sure that you want to delete this VM?');"''')}