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

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

Remove the MAC address from the summary page.

File size: 2.3 KB
RevLine 
[113]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>
[133]20        <td>Uptime</td>
[113]21        <td>VNC</td>
[144]22        <td></td>
[113]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
[133]36<td>#slurp
[144]37#if $uptimes[$machine]
38$uptimes[$machine]#slurp
[133]39#else
40Off#slurp
41#end if
42</td>
43        <td>#slurp
[144]44#if $has_vnc[$machine] == True
[133]45<a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
46#else
[144]47$has_vnc[$machine]
[133]48#end if
49</td>
[113]50        <td>
[133]51          <form action="command">
[113]52            <input type="hidden" name="machine_id"
53                   value="$machine.machine_id"/>
[144]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
[113]59          </form>
60        </td>
61      </tr>
62      #end for
63    </table>
64#end if
[144]65#if $can_add_vm
[113]66    <p>Create a new VM:</p>
[133]67    <form action="create" method="POST">
[113]68      <table>
69        <tr>
70          <td>Name</td>
[162]71          <td><input type="text" name="name" value=""/></td>
[113]72        </tr>
73        <tr>
74          <td>Memory</td>
[144]75          <td><input type="text" name="memory" value="$default_mem" size=3/> megabytes ($max_mem max)</td>
[113]76        </tr>
77        <tr>
78          <td>Disk</td>
[144]79          <td><input type="text" name="disk" value="$default_disk" size=3/> gigabytes (${"%0.1f" % ($max_disk-0.05)} max)</td>
[113]80        </tr>
81        <tr>
[139]82          <td>HVM/ParaVM$helppopup('hvm_paravm')</td>
[113]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>
[133]89          <td>Boot CD</td>
[113]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>
[144]104#else
105<p>You are at the maximum number of VMs.</p>
106#end if
[113]107#end def
Note: See TracBrowser for help on using the repository browser.