X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/49466ab6194ad35f3857e950721252621c3e539d..c3226455f0fd065757b681e2be52e8d8c2362ff8:/templates/list.tmpl diff --git a/templates/list.tmpl b/templates/list.tmpl index 7dd0da0..67cefdc 100644 --- a/templates/list.tmpl +++ b/templates/list.tmpl @@ -1,27 +1,63 @@ #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 + + +
NameMemoryownerIPMAC AddressHostnameUptimeVNCRestart?
+ $errorRow('create', $err) + + + + +$errorRow('name', $err) + + + + +$errorRow('memory', $err) + + + + +$errorRow('disk', $err) + + + + +$errorRow('vmtype', $err) + + + + +$errorRow('cdrom', $err) +
Name
Memory megabytes ($max_memory max)
Disk gigabytes (${"%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)
+ + +#end if +#end def + +#def machineRow($machine) $machine.name ${machine.memory}M @@ -29,77 +65,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) == True +#if $has_vnc[$machine] == True Console#slurp #else -$has_vnc.get($machine.name) +$has_vnc[$machine] #end if -
+ + - +
+#end def + +#def machineList($machines) + + + + + + + + + + #for $machine in $machines: + $machineRow($machine) #end for
NameMemoryownerIPUptimeVNC
-#end if +#end def -

Create a new VM:

-
- - - - - - - - - - - - - - - - - - - - - -
Name${user.username}_
Memory megabytes ($maxmem max)
Disk gigabytes ($maxdisk max)
HVM/ParaVM - HVM - ParaVM -
Boot CD - -
- -
+#def body +#if not $machines +

You don't currently control any VMs.

+#else +

You have the following VMs:

+#end if +

refresh

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