From: Eric Price Date: Mon, 8 Oct 2007 06:56:01 +0000 (-0400) Subject: ParaVM on list X-Git-Tag: sipb-xen-www/1~84 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/49466ab6194ad35f3857e950721252621c3e539d ParaVM on list svn path=/trunk/web/; revision=138 --- diff --git a/templates/list.tmpl b/templates/list.tmpl index 73e7c0a..7dd0da0 100644 --- a/templates/list.tmpl +++ b/templates/list.tmpl @@ -44,10 +44,10 @@ Off#slurp #end if #slurp -#if $has_vnc.get($machine.name) +#if $has_vnc.get($machine.name) == True Console#slurp #else -off#slurp +$has_vnc.get($machine.name) #end if diff --git a/templates/main.py b/templates/main.py index cb8229c..4a50e43 100755 --- a/templates/main.py +++ b/templates/main.py @@ -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 (?)' % (help_name, help_name) # for m in machines: # status = statusInfo(m) # on[m.name] = status is not None