X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/19c3385da7c17892b9a9389c88028897ff5ca8ad..130435f257877a1f8bb82f2b432b45c973e5aefc:/templates/list.tmpl diff --git a/templates/list.tmpl b/templates/list.tmpl index 05b5c2c..d6c0e00 100644 --- a/templates/list.tmpl +++ b/templates/list.tmpl @@ -1,26 +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:

- - - - - - - - - - - #for $machine in $machines: +

Create a new VM:

+#if $err +

We had a problem with your request:

+#else if $varExists('new_machine') +

Congratulations! You successfully created a new VM called $new_machine.

+#end if + + +
NameMemoryownerIPHostnameUptimeVNC
+ $errorRow('create', $err) + + + + +$errorRow('name', $err) + + + + +$errorRow('memory', $err) + + + + +$errorRow('disk', $err) + + + + +$errorRow('vmtype', $err) + + + + +$errorRow('cdrom', $err) + + + + + $errorRow('owner', $err) +
Name
Memory MiB ($max_memory max)
Disk GiB (${"%0.1f" % ($max_disk-0.05)} max)
HVM/ParaVM$helppopup('hvm_paravm') +#for $value, $name in (('hvm', 'HVM'), ('paravm', 'ParaVM')) + $name +#end for +
Boot CD$cdromList($cdroms, $defaults.cdrom)
Owner
+ + +#end if +#end def + +#def machineRow($machine) $machine.name ${machine.memory}M @@ -28,14 +70,12 @@ List of your VMs #if $machine.nics #set $nic = $machine.nics[0] $nic.ip - $nic.hostname #else - #end if #slurp -#if $uptimes[$machine] -$uptimes[$machine]#slurp +#if $machine.uptime +$machine.uptime#slurp #else Off#slurp #end if @@ -48,60 +88,46 @@ $has_vnc[$machine] #end if -
+ + -#if $uptimes[$machine] - -#else - -#end if +
+#end def + +#def machineList($machines) + + + + + + + + + + #for $machine in $machines: + $machineRow($machine) #end for
NameMemoryOwnerIPUptimeVNC
-#end if -#if $can_add_vm -

Create a new VM:

-
- - - - - - - - - - - - - - - - - - - - - -
Name
Memory megabytes ($max_mem max)
Disk gigabytes (${"%0.1f" % ($max_disk-0.05)} max)
HVM/ParaVM$helppopup('hvm_paravm') - HVM - ParaVM -
Boot CD - -
- -
+#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 +

refresh

+
+ $machineList($machines) +
+
+$createTable() +
#end def