#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>
return 10.0
def haveAccess(user, machine):
- if user.username == 'quentin':
+ if user.username == 'moo':
return True
return machine.owner == user.username
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&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