source: trunk/packages/sipb-xen-www/code/templates/info.tmpl @ 443

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

Support autoinstalls table for creation list.

File size: 3.0 KB
Line 
1#from skeleton import skeleton
2#extends skeleton
3
4#def title
5Info on $machine.name
6#end def
7
8#def infoTable()
9<h2>Info</h2>
10<table>
11  #for $key, $value in $fields
12  <tr><td>$key:</td><td>$value</td></tr>
13  #end for
14</table>
15#end def
16
17#def commands()
18<form action="command" method="POST">
19  <input type="hidden" name="back" value="info"/>
20  <input type="hidden" name="machine_id" value="$machine.machine_id"/>
21  <table>
22   
23    <tr><td colspan=3>
24        #if $on
25        #if $has_vnc
26        <strong><a href="vnc?machine_id=$machine.machine_id">Get Console</a></strong>
27        #else
28        VNC console not enabled; still booting?
29        #end if
30        #else
31
32        #end if
33    </td></tr>
34      <tr>
35        #if $on
36        <td><button type="submit" class="button" name="action" value="Power off">Power off (hard)</button></td>
37        <td><button type="submit" class="button" name="action" value="Shutdown">Shut down</button></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>$cdromList()</td>
44  </tr>
45    <tr>
46      <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>
47    </tr>
48  </table>
49</form>
50#end def
51
52#def modifyForm()
53#if $err
54<p class="error">We had a problem with your request:</p>
55#else if $varExists('new_machine')
56<p>Successfully modified.</p>
57#end if
58#if $on
59(To edit ram, disk size, or machine name, turn off the machine first.)
60#end if
61<form action="modify" method="POST">
62  <input type="hidden" name="machine_id" value="$defaults.machine_id"/>
63  <table>
64    <tr><td>Owner${helppopup("owner")}:</td><td><input type="text" name="owner", value="$defaults.owner"/></td></tr>
65$errorRow('owner', $err)
66    <tr><td>Administrator${helppopup("administrator")}:</td><td><input type="text" name="administrator", value="$defaults.administrator"/></td></tr>
67$errorRow('administrator', $err)
68    <tr><td>Contact email:</td><td><input type="text" name="contact" value="$defaults.contact"/></td></tr>
69$errorRow('contact', $err)
70#if not $on
71    <tr><td>Machine Name:</td><td><input type="text" name="name" value="$defaults.name"/></td></tr>
72$errorRow('name', $err)
73    <tr>
74      <td>HVM/ParaVM$helppopup('hvm_paravm')</td>
75      <td>$vmTypeList($defaults.type)</td>
76    </tr>
77    <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="$defaults.memory"/>MiB (max $max_mem)</td></tr>
78$errorRow('memory', $err)
79    <tr><td>Disk:</td><td><input type="text" size=3 name="disk" value="$defaults.disk"/>GiB (max $max_disk)</td><td>WARNING: Modifying disk size may corrupt your data.</td></tr>
80$errorRow('disk', $err)
81#else
82$errorRow('name', $err)
83$errorRow('memory', $err)
84$errorRow('disk', $err)
85#end if
86    <tr><td><input type="submit" class="button" name="action" value="Change"/></td></tr>
87  </table>
88</form>
89#end def
90
91#def body
92<div id="info">
93  $infoTable()
94</div>
95
96<h2>Commands</h2>
97<div id="commands">
98  $commands()
99</div>
100<h2>Settings</h2>
101<div id="modify">
102  $modifyForm()
103</div>
104#end def
Note: See TracBrowser for help on using the repository browser.