X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/7268d3236dc1ea69c8ff786e43ea77939c6d1a97..2522490e79e9f5a5aece3e681134e0cc4cc710c5:/templates/list.tmpl diff --git a/templates/list.tmpl b/templates/list.tmpl index e300f61..19b4c6e 100644 --- a/templates/list.tmpl +++ b/templates/list.tmpl @@ -1,44 +1,82 @@ #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 | -- #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[$machine] -$uptimes[$machine]#slurp +#if $machine.uptime +$machine.uptime#slurp #else Off#slurp #end if @@ -51,60 +89,47 @@ $has_vnc[$machine] #end if | - |
Name | +Memory | +Owner | +Administrator | +IP | +Uptime | +VNC | ++ #for $machine in $machines: + $machineRow($machine) #end for |
Create a new VM:
- +#end def + + +#def body +#if not $machines +You don't currently control any VMs.
#else -You are at the maximum number of VMs.
+You have the following VMs:
#end if + +