X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/e0e7814e58df1dc0342e3f88e7bcfad4ed483079..7f1e55f398d25ec110573104910c04cfede8e722:/templates/list.tmpl?ds=inline diff --git a/templates/list.tmpl b/templates/list.tmpl index 19b108e..19b4c6e 100644 --- a/templates/list.tmpl +++ b/templates/list.tmpl @@ -1,105 +1,135 @@ #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 | $machine.owner | +$machine.administrator | #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) == True +#if $has_vnc[$machine] == True Console#slurp #else -$has_vnc.get($machine.name) +$has_vnc[$machine] #end if | - |
Name | +Memory | +Owner | +Administrator | +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 + +