ParaVM on list
[invirt/packages/invirt-web.git] / templates / main.py
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