For new naming scheme.
authorEric Price <ecprice@mit.edu>
Tue, 9 Oct 2007 06:31:30 +0000 (02:31 -0400)
committerEric Price <ecprice@mit.edu>
Tue, 9 Oct 2007 06:31:30 +0000 (02:31 -0400)
svn path=/trunk/web/; revision=147

templates/info.tmpl
templates/main.py

index f537dd2..46767b2 100644 (file)
@@ -69,7 +69,7 @@ Info on $machine.name
 #end if
 #if not $on
     <tr><td>Ram:</td><td><input type="text" size=3 value="$machine.memory"/>MB (max $max_mem)</td></tr>
-    <tr><td>Disk:</td><td><input type="text" size=3 value="${machine.disks[0].size/1024.}"/>GB (max $max_disk)</td></tr>
+    <tr><td>Disk:</td><td><input type="text" size=3 value="${machine.disks[0].size/1024.}"/>GB (max $max_disk)</td><td>WARNING: Modifying disk size may corrupt your data.</td></tr>
 #end if
     <tr><td><input type="submit" class="button" name="action" value="Change"/></td></tr>
   </table>
index 152cd75..984f3b8 100755 (executable)
@@ -212,7 +212,7 @@ def getUptimes(machines):
     value_string = remctl('web', 'listvms')
     lines = value_string.splitlines()
     d = {}
-    for line in lines[1:]:
+    for line in lines:
         lst = line.split()
         name, id = lst[:2]
         uptime = ' '.join(lst[2:])
@@ -592,6 +592,7 @@ def info(user, fields):
                       ]
     fields = []
     machine_info = {}
+    machine_info['name'] = machine.name
     machine_info['type'] = machine.type.hvm and 'HVM' or 'ParaVM'
     machine_info['owner'] = machine.owner
     machine_info['contact'] = machine.contact
@@ -608,10 +609,10 @@ def info(user, fields):
     for field, disp in display_fields:
         if field in ('uptime', 'cputime'):
             fields.append((disp, locals()[field]))
-        elif field in main_status:
-            fields.append((disp, main_status[field]))
         elif field in machine_info:
             fields.append((disp, machine_info[field]))
+        elif field in main_status:
+            fields.append((disp, main_status[field]))
         else:
             pass
             #fields.append((disp, None))