source: trunk/web/templates/list.tmpl @ 186

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

Remove the MAC address from the summary page.

File size: 2.3 KB
Line 
1#from skeleton import skeleton
2#extends skeleton
3
4#def title
5List 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>Hostname</td>
20        <td>Uptime</td>
21        <td>VNC</td>
22        <td></td>
23      #for $machine in $machines:
24      <tr>
25        <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
26        <td>${machine.memory}M</td>
27        <td>$machine.owner</td>
28#if $machine.nics
29#set $nic = $machine.nics[0]
30        <td>$nic.ip</td>
31        <td>$nic.hostname</td>
32#else
33        <td></td>
34        <td></td>
35#end if
36<td>#slurp
37#if $uptimes[$machine]
38$uptimes[$machine]#slurp
39#else
40Off#slurp
41#end if
42</td>
43        <td>#slurp
44#if $has_vnc[$machine] == True
45<a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
46#else
47$has_vnc[$machine]
48#end if
49</td>
50        <td>
51          <form action="command">
52            <input type="hidden" name="machine_id"
53                   value="$machine.machine_id"/>
54#if $uptimes[$machine]
55            <input type="submit" class="button" name="action" value="Shutdown"/>
56#else
57            <input type="submit" class="button" name="action" value="Power on"/>
58#end if
59          </form>
60        </td>
61      </tr>
62      #end for
63    </table>
64#end if
65#if $can_add_vm
66    <p>Create a new VM:</p>
67    <form action="create" method="POST">
68      <table>
69        <tr>
70          <td>Name</td>
71          <td><input type="text" name="name" value=""/></td>
72        </tr>
73        <tr>
74          <td>Memory</td>
75          <td><input type="text" name="memory" value="$default_mem" size=3/> megabytes ($max_mem max)</td>
76        </tr>
77        <tr>
78          <td>Disk</td>
79          <td><input type="text" name="disk" value="$default_disk" size=3/> gigabytes (${"%0.1f" % ($max_disk-0.05)} max)</td>
80        </tr>
81        <tr>
82          <td>HVM/ParaVM$helppopup('hvm_paravm')</td>
83          <td>
84            <input checked type="radio" name="vmtype" value="hvm">HVM</input>
85            <input type="radio" name="vmtype" value="paravm">ParaVM</input>
86          </td>
87        </tr>
88        <tr>
89          <td>Boot CD</td>
90          <td>
91            <select name="cdrom">
92              <option selected value="">None</option>
93              #for $cdrom in $cdroms
94              <option value="$cdrom.cdrom_id">
95                $cdrom.description
96              </option>
97              #end for
98            </select>
99          </td>
100        </tr>
101      </table>
102      <input type="submit" class="button" value="Create it!"/>
103    </form>
104#else
105<p>You are at the maximum number of VMs.</p>
106#end if
107#end def
Note: See TracBrowser for help on using the repository browser.