Moo!
[invirt/packages/invirt-web.git] / templates / list.tmpl
index f820385..73e7c0a 100644 (file)
@@ -18,7 +18,7 @@ List of your VMs
        <td>IP</td>
        <td>MAC Address</td>
        <td>Hostname</td>
-       <td>Status</td>
+       <td>Uptime</td>
        <td>VNC</td>
        <td>Restart?</td>
       #for $machine in $machines:
@@ -36,14 +36,26 @@ List of your VMs
        <td></td>
        <td></td>
 #end if
-       <td>Good!</td>
-       <td><a href="vnc?machine_id=$machine.machine_id">Console</a></td>
+<td>#slurp
+#if $uptimes.get($machine.name)
+$uptimes[$machine.name]#slurp
+#else
+Off#slurp
+#end if
+</td>
+       <td>#slurp
+#if $has_vnc.get($machine.name)
+<a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
+#else
+off#slurp
+#end if
+</td>
        <td>
-         <form action="restart">
+         <form action="command">
            <input type="hidden" name="machine_id"
                   value="$machine.machine_id"/>
            <input type="submit" class="button"
-                  value="restart"/>
+                  value="Reboot"/>
          </form>
        </td>
       </tr>
@@ -52,19 +64,17 @@ List of your VMs
 #end if
 
     <p>Create a new VM:</p>
-    <form action="create">
+    <form action="create" method="POST">
       <table>
        <tr>
          <td>Name</td>
-         <td><input type="text" name="name" value="$user.username"/></td>
+         <td>${user.username}_<input type="text" name="name" value=""/></td>
        </tr>
        <tr>
-         #set $maxmem=256
          <td>Memory</td>
          <td><input type="text" name="memory" value="$maxmem" size=3/> megabytes ($maxmem max)</td>
        </tr>
        <tr>
-         #set $maxdisk=1.5
          <td>Disk</td>
          <td><input type="text" name="disk" value="$maxdisk" size=3/> gigabytes ($maxdisk max)</td>
        </tr>
@@ -76,7 +86,7 @@ List of your VMs
          </td>
        </tr>
        <tr>
-         <td>Initial Install</td>
+         <td>Boot CD</td>
          <td>
            <select name="cdrom">
              <option selected value="">None</option>