%page expression_filter="h"/>
<%inherit file="skeleton.mako" />
<%def name="title()">
Info on ${machine.name}
%def>
%if os.path.exists("/etc/invirt/motd.html"):
${open('/etc/invirt/motd.html').read()|n}
%endif
<%def name="infoTable()">
Info
% for key, value in fields:
${key}: | ${value} |
% endfor
% if on:
% if 'monitoring' in config and len(config.monitoring) and 'baseuri' in config.monitoring[0]:
CPU history: |  |
Network history: |  |
% endif
% endif
%def>
<%def name="commands()">
% if on:
% if not machine.type.hvm:
Console access: type
ssh ${machine.name}@${config.console.hostname}
on Athena. (more info)
% elif has_vnc:
Get Console
% else:
VNC console not enabled; still booting?
% endif
% endif
<%def name="command_button(title, value, cdrom=False, extra='')">
%def>
% if renumber:
This machine's IP address is slated to be changed. Your machine's new IP address, netmask, and gateway are shown above. Please configure your machine for DHCP or update the machine's configuration and then press this button:
% if on:
${command_button("Power cycle and renumber", "renumber", extra='''onclick="return confirm('Are you sure that you want to power this VM off and on again?');"''')}
% else:
${command_button("Renumber", "renumber")}
% endif
% endif
% if on:
${command_button("Power off", "destroy")}
${command_button("Shutdown", "shutdown")}
${command_button("Reboot", "reboot", cdrom=True)}
% else:
${command_button("Power on", "create", cdrom=True)}
% endif
${command_button("Delete VM", "delete", extra='''onclick="return confirm('Are you sure that you want to delete this VM (\\\'%s\\\')?');"''' % (machine.name))}
%def>
<%def name="modifyForm()">
% if err:
We had a problem with your request:
% elif new_machine:
Successfully modified.
% endif
% if on:
(To edit ram, disk size, or machine name, turn off the machine first.)
% endif
%def>
${infoTable()}
Commands
${commands()}
Settings
${modifyForm()}