X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/fbb16ba8e40d6b99bc7501faf4ebd934631900ca..130435f257877a1f8bb82f2b432b45c973e5aefc:/templates/list.tmpl?ds=sidebyside diff --git a/templates/list.tmpl b/templates/list.tmpl index 73e7c0a..d6c0e00 100644 --- a/templates/list.tmpl +++ b/templates/list.tmpl @@ -1,27 +1,68 @@ #from skeleton import skeleton #extends skeleton + #def title List of your VMs #end def -#def body -#if not $machines - +#def createTable() +#if $cant_add_vm +
$cant_add_vm
#else -You have the following VMs:
-Name | -Memory | -owner | -IP | -MAC Address | -Hostname | -Uptime | -VNC | -Restart? | - #for $machine in $machines: +||
$machine.name | ${machine.memory}M | @@ -29,77 +70,64 @@ List of your VMs #if $machine.nics #set $nic = $machine.nics[0]$nic.ip | -$nic.mac_addr | -$nic.hostname | #else- | - | #end if | #slurp -#if $uptimes.get($machine.name) -$uptimes[$machine.name]#slurp +#if $machine.uptime +$machine.uptime#slurp #else Off#slurp #end if | #slurp -#if $has_vnc.get($machine.name) +#if $has_vnc[$machine] == True Console#slurp #else -off#slurp +$has_vnc[$machine] #end if | - |
Name | +Memory | +Owner | +IP | +Uptime | +VNC | ++ #for $machine in $machines: + $machineRow($machine) #end for |
Create a new VM:
- +#def body +#if not $machines +You don't currently control any VMs.
+#else +You have the following VMs:
+#end if + +