web: don't send mail on error if it's one of us testing
[invirt/packages/invirt-web.git] / code / templates / list.tmpl
index 8d8b8f6..61eafdb 100644 (file)
@@ -25,7 +25,7 @@ VM List
 #end filter
        <tr>
          <td>Name</td>
 #end filter
        <tr>
          <td>Name</td>
-         <td><input type="text" name="name" value="$defaults.name"/></td>
+         <td><input type="text" name="name" value="$defaults.name"/>.xvm.mit.edu</td>
        </tr>
 #filter None
 $errorRow('name', $err)
        </tr>
 #filter None
 $errorRow('name', $err)
@@ -118,6 +118,16 @@ $errorRow('cdrom', $err)
 
 #def machineRow($machine)
       <tr> 
 
 #def machineRow($machine)
       <tr> 
+       <td rowspan="2">
+         <form action="command" method="post">
+           <input type="hidden" name="back" value="list"/>
+           <input type="hidden" name="machine_id"
+                  value="$machine.machine_id"/>
+<input type="submit" class="button" name="action" value="#slurp
+#if $machine.uptime then 'Power off' else 'Power on'
+"/>
+         </form>
+       </td>
        <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
        <td>${machine.memory}M</td>
        <td>$machine.owner</td>
        <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
        <td>${machine.memory}M</td>
        <td>$machine.owner</td>
@@ -142,16 +152,6 @@ $has_vnc[$machine]
 #end filter
 #end if
 </td>
 #end filter
 #end if
 </td>
-       <td rowspan="2">
-         <form action="command" method="post">
-           <input type="hidden" name="back" value="list"/>
-           <input type="hidden" name="machine_id"
-                  value="$machine.machine_id"/>
-<input type="submit" class="button" name="action" value="#slurp
-#if $machine.uptime then 'Power off' else 'Power on'
-"/>
-         </form>
-       </td>
       </tr>
       <tr>
         <td colspan="7" style="padding-left: 1em; color: #666">$machine.description</td>
       </tr>
       <tr>
         <td colspan="7" style="padding-left: 1em; color: #666">$machine.description</td>
@@ -159,8 +159,9 @@ $has_vnc[$machine]
 #end def
 
 #def machineList($machines)
 #end def
 
 #def machineList($machines)
-    <table>
+    <table cellspacing="0" cellpadding="2">
       <tr>
       <tr>
+       <th></th>
        <th>Name</th>
        <th>Memory</th>
        <th>Owner#slurp
        <th>Name</th>
        <th>Memory</th>
        <th>Owner#slurp
@@ -176,7 +177,6 @@ $helppopup('Administrator')#slurp
        <th>IP</th>
        <th>Uptime</th>
        <th>VNC</th>
        <th>IP</th>
        <th>Uptime</th>
        <th>VNC</th>
-       <th></th>
       </tr>
       #for $machine in $machines:
     #filter None
       </tr>
       #for $machine in $machines:
     #filter None
@@ -184,6 +184,13 @@ $helppopup('Administrator')#slurp
     #end filter
       #end for
     </table>
     #end filter
       #end for
     </table>
+    <script type="text/javascript" src="/static/stripe.js"></script>
+    <script type="text/javascript">
+        document.observe("dom:loaded", function() {
+            stripe(\$('machinelist').getElementsByTagName('table')[0],
+                   'stripedrow');
+        });
+    </script>
 #end def
 
 
 #end def