Get username from cherrypy request object
[invirt/packages/invirt-web.git] / code / templates / info.tmpl
index d115955..d872fce 100644 (file)
@@ -15,45 +15,38 @@ Info on $machine.name
 #end def
 
 #def commands()
+#if $on
+ #if not $machine.type.hvm
+  Console access: type
+  <tt>ssh $machine.name@$config.console.hostname</tt>
+  on Athena. <a href="https://xvm.scripts.mit.edu/wiki/SerialConsole">(more info)</a>
+ #elif $has_vnc
+  <strong><a href="vnc?machine_id=$machine.machine_id">Get Console</a></strong>
+ #else
+  VNC console not enabled; still booting?
+ #end if
+#end if
 <form action="command" method="POST">
   <input type="hidden" name="back" value="info"/>
   <input type="hidden" name="machine_id" value="$machine.machine_id"/>
-  <table>
-    
-    <tr><td colspan=100>
-       #if $on
-        #if not $machine.type.hvm
-        Console access: type
-        <tt>ssh $machine.name@$config.console.hostname</tt>
-        on Athena. <a href="https://xvm.scripts.mit.edu/wiki/SerialConsole">(more info)</a>
-       #elif $has_vnc
-       <strong><a href="vnc?machine_id=$machine.machine_id">Get Console</a></strong>
-       #else
-       VNC console not enabled; still booting?
-       #end if
-       #else
-
-       #end if
-    </td></tr>
-      <tr>
+  <div>
        #if $on
-       <td><button type="submit" class="button" name="action" value="Power off">Power off (hard)</button></td>
-       <td><button type="submit" class="button" name="action" value="Shutdown">Shut down</button></td>
-       <td><input type="submit" class="button" name="action" value="Reboot"/></td>
+       <button type="submit" class="button" name="action" value="Power off">Power off (hard)</button>
+       <button type="submit" class="button" name="action" value="Shutdown">Shut down</button>
+       <input type="submit" class="button" name="action" value="Reboot"/>
        #else
-       <td><input type="submit" class="button" name="action" value="Power on"/></td>
+       <input type="submit" class="button" name="action" value="Power on"/>
        #end if
-      <td>Boot CD:</td>
-      <td>#slurp
+  </div>
+  <div>
+    Boot CD:
 #filter None
 $cdromList()#slurp
 #end filter
-</td>
-  </tr>
-    <tr>
-      <td><input type="submit" class="button" name="action" value="Delete VM" onclick="return confirm('Are you sure that you want to delete this VM?');"/></td>
-    </tr>
-  </table>
+  </div>
+  <div>
+      <input type="submit" class="button" name="action" value="Delete VM" onclick="return confirm('Are you sure that you want to delete this VM?');"/>
+  </div>
 </form>
 #end def