%page expression_filter="h"/>
<%inherit file="skeleton.mako" />
<%!
import datetime
%>
<%def name="title()">
VM List
%def>
<%def name="createForm()">
% if cant_add_vm:
${cant_add_vm}
% else:
Create a new VM
% if err:
We had a problem with your request:
% elif new_machine:
Congratulations! You successfully created a new VM called ${new_machine}.
% endif
% endif
%def>
<%def name="machineRow(machine, dark)">
% if machine.uptime and installing[machine]:
% else:
% endif
|
${machine.name} |
${machine.memory}M |
${machine.owner} |
${machine.administrator} |
% if machine.nics:
${', '.join(nic.ip for nic in machine.nics)} |
% else:
|
% endif
\
% if machine.uptime:
${datetime.timedelta(seconds=int(machine.uptime))}\
% endif
|
\
% if has_vnc[machine] == True:
Console\
% elif has_vnc[machine] == 'ParaVM':
ParaVM${self.fn.helppopup("ParaVM Console")}
% elif has_vnc[machine] != 'Off':
${has_vnc[machine]}
% endif
|
${machine.description|self.fn.module.nl2br} |
%def>
<%def name="machineList(machines)">
|
Name |
Memory |
Owner${self.fn.helppopup('Owner')} |
Administrator${self.fn.helppopup('Administrator')} |
IP |
Uptime |
VNC |
% for n, machine in enumerate(machines):
${machineRow(machine, (n%2)==0)}
% endfor
%def>
What is XVM?
% if not machines:
You don't currently control any VMs.
% endif
refresh
${machineList(machines)}
${createForm()}