Last change
on this file since 120 was
113,
checked in by ecprice, 17 years ago
|
Initial import of web interface.
|
File size:
2.0 KB
|
Line | |
---|
1 | #from skeleton import skeleton |
---|
2 | #extends skeleton |
---|
3 | |
---|
4 | #def title |
---|
5 | List of your VMs |
---|
6 | #end def |
---|
7 | |
---|
8 | #def body |
---|
9 | #if not $machines |
---|
10 | |
---|
11 | #else |
---|
12 | <p>You have the following VMs:</p> |
---|
13 | <table> |
---|
14 | <tr> |
---|
15 | <td>Name</td> |
---|
16 | <td>Memory</td> |
---|
17 | <td>owner</td> |
---|
18 | <td>IP</td> |
---|
19 | <td>MAC Address</td> |
---|
20 | <td>Hostname</td> |
---|
21 | <td>Status</td> |
---|
22 | <td>VNC</td> |
---|
23 | <td>Restart?</td> |
---|
24 | #for $machine in $machines: |
---|
25 | <tr> |
---|
26 | <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td> |
---|
27 | <td>${machine.memory}M</td> |
---|
28 | <td>$machine.owner</td> |
---|
29 | #if $machine.nics |
---|
30 | #set $nic = $machine.nics[0] |
---|
31 | <td>$nic.ip</td> |
---|
32 | <td>$nic.mac_addr</td> |
---|
33 | <td>$nic.hostname</td> |
---|
34 | #else |
---|
35 | <td></td> |
---|
36 | <td></td> |
---|
37 | <td></td> |
---|
38 | #end if |
---|
39 | <td>Good!</td> |
---|
40 | <td><a href="vnc?machine_id=$machine.machine_id">Console</a></td> |
---|
41 | <td> |
---|
42 | <form action="restart"> |
---|
43 | <input type="hidden" name="machine_id" |
---|
44 | value="$machine.machine_id"/> |
---|
45 | <input type="submit" class="button" |
---|
46 | value="restart"/> |
---|
47 | </form> |
---|
48 | </td> |
---|
49 | </tr> |
---|
50 | #end for |
---|
51 | </table> |
---|
52 | #end if |
---|
53 | |
---|
54 | <p>Create a new VM:</p> |
---|
55 | <form action="create"> |
---|
56 | <table> |
---|
57 | <tr> |
---|
58 | <td>Name</td> |
---|
59 | <td><input type="text" name="name" value="$user.username"/></td> |
---|
60 | </tr> |
---|
61 | <tr> |
---|
62 | #set $maxmem=256 |
---|
63 | <td>Memory</td> |
---|
64 | <td><input type="text" name="memory" value="$maxmem" size=3/> megabytes ($maxmem max)</td> |
---|
65 | </tr> |
---|
66 | <tr> |
---|
67 | #set $maxdisk=1.5 |
---|
68 | <td>Disk</td> |
---|
69 | <td><input type="text" name="disk" value="$maxdisk" size=3/> gigabytes ($maxdisk max)</td> |
---|
70 | </tr> |
---|
71 | <tr> |
---|
72 | <td>HVM/ParaVM</td> |
---|
73 | <td> |
---|
74 | <input checked type="radio" name="vmtype" value="hvm">HVM</input> |
---|
75 | <input type="radio" name="vmtype" value="paravm">ParaVM</input> |
---|
76 | </td> |
---|
77 | </tr> |
---|
78 | <tr> |
---|
79 | <td>Initial Install</td> |
---|
80 | <td> |
---|
81 | <select name="cdrom"> |
---|
82 | <option selected value="">None</option> |
---|
83 | #for $cdrom in $cdroms |
---|
84 | <option value="$cdrom.cdrom_id"> |
---|
85 | $cdrom.description |
---|
86 | </option> |
---|
87 | #end for |
---|
88 | </select> |
---|
89 | </td> |
---|
90 | </tr> |
---|
91 | </table> |
---|
92 | <input type="submit" class="button" value="Create it!"/> |
---|
93 | </form> |
---|
94 | |
---|
95 | #end def |
---|
Note: See
TracBrowser
for help on using the repository browser.