1 <%page expression_filter="h"/>
2 <%inherit file="skeleton.mako" />
5 Info on ${machine.name}
8 <%def name="infoTable()">
11 % for key, value in fields:
12 <tr><td>${key}:</td><td>${value}</td></tr>
17 <%def name="commands()">
19 % if not machine.type.hvm:
21 <tt>ssh ${machine.name}@${config.console.hostname}</tt>
22 on Athena. <a href="https://xvm.scripts.mit.edu/wiki/SerialConsole">(more info)</a>
24 <strong><a href="machine/${machine.machine_id}/vnc">Get Console</a></strong>
26 VNC console not enabled; still booting?
29 <%def name="command_button(title, value, cdrom=False, extra='')">
30 <form action="machine/${machine.machine_id}/command/${value}" method="POST">
31 <input type="hidden" name="back" value="machine/${machine.machine_id}/info" />
32 <input type="submit" class="button" name="action" value="${title}" ${extra | n}/>
34 Boot CD: ${self.fn.cdromList()}
40 ${command_button("Power off", "destroy")}
41 ${command_button("Shutdown", "shutdown")}
42 ${command_button("Reboot", "reboot", cdrom=True)}
44 ${command_button("Power on", "create", cdrom=True)}
48 ${command_button("Delete VM", "delete", extra='''onclick="return confirm('Are you sure that you want to delete this VM?');"''')}
53 <%def name="modifyForm()">
55 <p class="error">We had a problem with your request:</p>
57 <p>Successfully modified.</p>
60 (To edit ram, disk size, or machine name, turn off the machine first.)
62 <form action="modify" method="POST">
63 <input type="hidden" name="machine_id" value="${defaults.machine_id}"/>
65 <tr><td>Description:</td><td colspan="2"><textarea name="description" rows="4" cols="60">${defaults.description}</textarea></td></tr>
66 <tr><td>Owner${self.fn.helppopup("Owner")}:</td><td><input type="text" name="owner", value="${defaults.owner}"/></td></tr>
67 ${self.fn.errorRow('owner', err)}
68 <tr><td>Administrator${self.fn.helppopup("Administrator")}:</td><td><input type="text" name="admin", value="${defaults.administrator}"/></td></tr>
69 ${self.fn.errorRow('administrator', err)}
70 <tr><td>Contact email:</td><td><input type="text" name="contact" value="${defaults.contact}"/></td></tr>
71 ${self.fn.errorRow('contact', err)}
73 <tr><td>Machine Name:</td><td><input type="text" name="name" value="${defaults.name}"/>.${config.dns.domains[0]}</td></tr>
74 ${self.fn.errorRow('name', err)}
76 <td>HVM/ParaVM${self.fn.helppopup('HVM/ParaVM')}</td>
77 <td>${self.fn.vmTypeList(defaults.type)}</td>
79 <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="${defaults.memory}"/>MiB (max ${max_mem})</td></tr>
80 ${self.fn.errorRow('memory', err)}
81 <tr><td>Disk:</td><td><input type="text" size=3 name="disksize" value="${defaults.disk}"/>GiB (max ${max_disk})</td><td>WARNING: Modifying disk size may corrupt your data.</td></tr>
82 ${self.fn.errorRow('disk', err)}
84 ${self.fn.errorRow('name', err)}
85 ${self.fn.errorRow('memory', err)}
86 ${self.fn.errorRow('disk', err)}
88 <tr><td><input type="submit" class="button" name="action" value="Change"/></td></tr>