source: trunk/web/templates/info.tmpl @ 163

Last change on this file since 163 was 161, checked in by ecprice, 17 years ago

Add support for
(A) modifying VM names, memory, disksize
(B) transferring ownership, hostname

Has issues with multiple disks/nics because of current interface.

(tabbott is the real author here)

File size: 2.5 KB
Line 
1#from skeleton import skeleton
2#extends skeleton
3
4#def title
5Info on $machine.name
6#end def
7
8
9#def body
10<h1>Info</h1>
11<p>Info on ${machine.name}:</p>
12<table>
13  #for $key, $value in $fields
14  <tr><td>$key:</td><td>$value</td></tr>
15  #end for
16</table>
17
18<p>Commands:</p>
19<form action="command" action="POST">
20  <input type="hidden" name="machine_id" value="$machine.machine_id"/>
21  <table>
22   
23    <tr><td>
24        #if $on
25        #if $has_vnc
26        <a href="vnc?machine_id=$machine.machine_id">Console</a>
27        #else
28        VNC is not enabled
29        #end if
30        #else
31
32        #end if
33    </td></tr>
34      <tr>
35        #if $on
36        <td><input type="submit" class="button" name="action" value="Power off"/></td>
37        <td><input type="submit" class="button" name="action" value="Shutdown"/></td>
38        <td><input type="submit" class="button" name="action" value="Reboot"/></td>
39        #else
40        <td><input type="submit" class="button" name="action" value="Power on"/></td>
41        #end if
42      <td>Boot CD:</td>
43      <td><select name="cdrom">
44          <option selected value="">None</option>
45          #for $cdrom in $cdroms
46          <option value="$cdrom.cdrom_id">
47            $cdrom.description
48          </option>
49          #end for
50      </select></td>
51  </tr>
52    <tr>
53      <td><input type="submit" class="button" name="action" value="Delete VM"/></td>
54    </tr>
55  </table>
56</form>
57<p>Change settings:
58#if $on
59(To edit ram and disk size, turn off the machine first.)
60#end if
61</p>
62<form action="modify" method="POST">
63  <input type="hidden" name="machine_id" value="$machine.machine_id"/>
64  <table>
65    <tr><td>Owner:</td><td><input type="text" name="owner", value="$machine.owner"/></td>
66        <td>NOTE: The Owner must the name of a locker that you administer</td></tr>
67    <tr><td>Contact email:</td><td><input type="text" name="contact" value="$machine.contact"/></td></tr>
68    <tr><td>Machine Name:</td><td><input type="text" name="name" value="$machine.name"/></td></tr>
69#if $machine.nics
70    <tr><td>Hostname:</td><td><input type="text" name="hostname" value="$machine.nics[0].hostname"/>.servers.csail.mit.edu</td>
71        <td>NOTE: The hostname must being with "Owner_".</td></tr>
72#end if
73#if not $on
74    <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="$machine.memory"/>MB (max $max_mem)</td></tr>
75    <tr><td>Disk:</td><td><input type="text" size=3 name="disk" value="${machine.disks[0].size/1024.}"/>GB (max $max_disk)</td><td>WARNING: Modifying disk size may corrupt your data.</td></tr>
76#end if
77    <tr><td><input type="submit" class="button" name="action" value="Change"/></td></tr>
78  </table>
79</form>
80
81#end def
Note: See TracBrowser for help on using the repository browser.