1 #from skeleton import skeleton
9 <p>Info on ${machine.name}:</p>
11 #for $key, $value in $fields
12 <tr><td>$key:</td><td>$value</td></tr>
19 function commandButton(elt, action){
21 cdrom = Form.serialize(form, true).cdrom;
22 new Ajax.Request('command', {method: 'post',
23 parameters: 'machine_id=$machine.machine_id&js=info&cdrom='+cdrom+'&action='+action,
24 onSuccess: replaceFunc
29 <form action="command" action="POST">
30 <input type="hidden" name="machine_id" value="$machine.machine_id"/>
36 <a href="vnc?machine_id=$machine.machine_id">Console</a>
46 <td><input type="submit" class="button" name="action" value="Power off" onclick="return commandButton(this, 'Power off');"/></td>
47 <td><input type="submit" class="button" name="action" value="Shutdown" onclick="return commandButton(this, 'Shutdown');"/></td>
48 <td><input type="submit" class="button" name="action" value="Reboot" onclick="return commandButton(this, 'Reboot');"/></td>
50 <td><input type="submit" class="button" name="action" value="Power on" onclick="return commandButton(this, 'Power on');"/></td>
53 <td>$cdromList($cdroms)</td>
56 <td><input type="submit" class="button" name="action" value="Delete VM" onclick="return confirm('Are you sure that you want to delete this VM?');"/></td>
64 <p class="error">We had a problem with your request:</p>
65 #else if $varExists('new_machine')
66 <p>Successfully modified.</p>
69 (To edit ram, disk size, or machine name, turn off the machine first.)
72 <form action="modify" method="POST" onsubmit="return jsFormSubmit('modify', this);">
73 <input type="hidden" name="machine_id" value="$defaults.machine_id"/>
75 <tr><td>Owner${helppopup("owner")}:</td><td><input type="text" name="owner", value="$defaults.owner"/></td></tr>
76 $errorRow('owner', $err)
77 <tr><td>Administrator${helppopup("administrator")}:</td><td><input type="text" name="administrator", value="$defaults.administrator"/></td></tr>
78 $errorRow('administrator', $err)
79 <tr><td>Contact email:</td><td><input type="text" name="contact" value="$defaults.contact"/></td></tr>
80 $errorRow('contact', $err)
82 <tr><td>Hostname:</td><td><input type="text" name="hostname" value="$defaults.hostname"/>.servers.csail.mit.edu</td></tr>
84 $errorRow('hostname', $err)
86 <tr><td>Machine Name:</td><td><input type="text" name="name" value="$defaults.name"/></td></tr>
87 $errorRow('name', $err)
88 <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="$defaults.memory"/>MB (max $max_mem)</td></tr>
89 $errorRow('memory', $err)
90 <tr><td>Disk:</td><td><input type="text" size=3 name="disk" value="$defaults.disk"/>GB (max $max_disk)</td><td>WARNING: Modifying disk size may corrupt your data.</td></tr>
91 $errorRow('disk', $err)
93 $errorRow('name', $err)
94 $errorRow('memory', $err)
95 $errorRow('disk', $err)
97 <tr><td><input type="submit" class="button" name="action" value="Change"/></td></tr>