ParaVM on list
authorEric Price <ecprice@mit.edu>
Mon, 8 Oct 2007 06:56:01 +0000 (02:56 -0400)
committerEric Price <ecprice@mit.edu>
Mon, 8 Oct 2007 06:56:01 +0000 (02:56 -0400)
svn path=/trunk/web/; revision=138

templates/list.tmpl
templates/main.py

index 73e7c0a..7dd0da0 100644 (file)
@@ -44,10 +44,10 @@ Off#slurp
 #end if
 </td>
        <td>#slurp
-#if $has_vnc.get($machine.name)
+#if $has_vnc.get($machine.name) == True
 <a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
 #else
-off#slurp
+$has_vnc.get($machine.name)
 #end if
 </td>
        <td>
index cb8229c..4a50e43 100755 (executable)
@@ -41,7 +41,7 @@ def maxDisk(user, machine=None):
     return 10.0
 
 def haveAccess(user, machine):
-    if user.username == 'quentin':
+    if user.username == 'moo':
         return True
     return machine.owner == user.username
 
@@ -276,10 +276,13 @@ def listVms(user, fields):
     uptimes = getUptimes(machines)
     on = uptimes
     for m in machines:
-        if on.get(m.name) and m.type.hvm:
+        if not on.get(m.name):
+            has_vnc[m.name] = 'Off'
+        elif m.type.hvm:
             has_vnc[m.name] = True
         else:
-            has_vnc[m.name] = False
+            help_name = 'paravm_console'
+            has_vnc[m.name] = 'ParaVM <span class="helplink"><a href="help?subject=%s&amp;simple=true" target="_blank" onclick="return helppopup(\'%s\')">(?)</a></span>' % (help_name, help_name)
     #     for m in machines:
     #         status = statusInfo(m)
     #         on[m.name] = status is not None