X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/907f34a95f096535be1b47e99f37b063a2a8245c..4baf2be62da525faa28eb7ae6bf2a00f7d30d1d3:/code/templates/list.tmpl

diff --git a/code/templates/list.tmpl b/code/templates/list.tmpl
index 8d8b8f6..f6dc5c4 100644
--- a/code/templates/list.tmpl
+++ b/code/templates/list.tmpl
@@ -25,7 +25,7 @@ VM List
 #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"/>.${config.dns.domains[0]}</td>
 	</tr>
 #filter None
 $errorRow('name', $err)
@@ -66,20 +66,10 @@ $vmTypeList($defaults.type)
 #filter None
 $errorRow('vmtype', $err)
 #end filter
-        <tr>
-          <td>Clone image?</td>
-#if $can_clone
-          <td><input type="checkbox" name="clone_from" id="clone_from" value="ice3" onchange="onclone(event)"/>
-              (experimental; 1-2 minutes, and you have an etch machine; root pw is 'password'.)
-              <script type='text/javascript'>function onclone(e){ document.getElementById('cdromlist').value = ''; }</script></td>
-#else
-	  <td><input type="checkbox" name="clone_from" id="clone_from" value="ice3" disabled="disabled"/> Image cloning is currently disabled for maintenance</td>
-#end if
-        </tr>
 #filter None
 $errorRow('autoinstall', $err)
 #end filter
-	<!--<tr>
+	<tr>
 	  <td>Autoinstall#slurp
 #filter None
 $helppopup('Autoinstall')#slurp
@@ -88,10 +78,10 @@ $helppopup('Autoinstall')#slurp
 	  <td><input type="radio" name="cd_or_auto" id="cd_or_auto_auto">
 #filter None
 $autoList($defaults.cdrom, "document.getElementById('cd_or_auto_auto').checked = true;document.getElementById('cdromlist').value = ''")
-	      (experimental; 1-2 minutes, and you have a machine; root pw is 'password'.)
+	      (experimental; 1-2 minutes, and you have a machine with empty root password.)
 #end filter
 	  </input>
-	</tr>-->
+	</tr>
 	<tr>
 	  <td>Boot CD</td>
 	  <td><input type="radio" name="cd_or_auto" id="cd_or_auto_cd" checked>
@@ -111,13 +101,29 @@ $errorRow('cdrom', $err)
 	$errorRow('owner', $err)
 #end filter
       </table>
-      <input type="submit" class="button" value="Create it!"/>
+      <input type="submit" class="button" value="Create it!"/><br />
+      Windows notes: #slurp
+#filter None
+$helppopup('Windows')#slurp
+#end filter
     </form>
 #end if
 #end def
 
 #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="power #slurp
+#if $machine.uptime then 'on' else 'off'
+" 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>
@@ -142,16 +148,6 @@ $has_vnc[$machine]
 #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>
@@ -159,8 +155,9 @@ $has_vnc[$machine]
 #end def
 
 #def machineList($machines)
-    <table>
+    <table cellspacing="0" cellpadding="2">
       <tr>
+	<th></th>
 	<th>Name</th>
 	<th>Memory</th>
 	<th>Owner#slurp
@@ -176,7 +173,6 @@ $helppopup('Administrator')#slurp
 	<th>IP</th>
 	<th>Uptime</th>
 	<th>VNC</th>
-	<th></th>
       </tr>
       #for $machine in $machines:
     #filter None
@@ -184,6 +180,13 @@ $helppopup('Administrator')#slurp
     #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