projects
/
invirt/packages/invirt-web.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No longer force user_ at start of machine name on machine creation.
[invirt/packages/invirt-web.git]
/
templates
/
list.tmpl
diff --git
a/templates/list.tmpl
b/templates/list.tmpl
index
73e7c0a
..
e300f61
100644
(file)
--- a/
templates/list.tmpl
+++ b/
templates/list.tmpl
@@
-20,7
+20,7
@@
List of your VMs
<td>Hostname</td>
<td>Uptime</td>
<td>VNC</td>
<td>Hostname</td>
<td>Uptime</td>
<td>VNC</td>
- <td>Restart?</td>
+ <td></td>
#for $machine in $machines:
<tr>
<td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
#for $machine in $machines:
<tr>
<td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
@@
-37,49
+37,52
@@
List of your VMs
<td></td>
#end if
<td>#slurp
<td></td>
#end if
<td>#slurp
-#if $uptimes.get($machine.name)
-$uptimes[$machine.name]#slurp
+#if $uptimes[$machine]
+$uptimes[$machine]#slurp
#else
Off#slurp
#end if
</td>
<td>#slurp
#else
Off#slurp
#end if
</td>
<td>#slurp
-#if $has_vnc.get($machine.name)
+#if $has_vnc[$machine] == True
<a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
#else
<a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
#else
-off#slurp
+$has_vnc[$machine]
#end if
</td>
<td>
<form action="command">
<input type="hidden" name="machine_id"
value="$machine.machine_id"/>
#end if
</td>
<td>
<form action="command">
<input type="hidden" name="machine_id"
value="$machine.machine_id"/>
- <input type="submit" class="button"
- value="Reboot"/>
+#if $uptimes[$machine]
+ <input type="submit" class="button" name="action" value="Shutdown"/>
+#else
+ <input type="submit" class="button" name="action" value="Power on"/>
+#end if
</form>
</td>
</tr>
#end for
</table>
#end if
</form>
</td>
</tr>
#end for
</table>
#end if
-
+#if $can_add_vm
<p>Create a new VM:</p>
<form action="create" method="POST">
<table>
<tr>
<td>Name</td>
<p>Create a new VM:</p>
<form action="create" method="POST">
<table>
<tr>
<td>Name</td>
- <td>${user.username}_<input type="text" name="name" value=""/></td>
+ <td><input type="text" name="name" value=""/></td>
</tr>
<tr>
<td>Memory</td>
</tr>
<tr>
<td>Memory</td>
- <td><input type="text" name="memory" value="$maxmem" size=3/> megabytes ($maxmem max)</td>
+ <td><input type="text" name="memory" value="$default_mem" size=3/> megabytes ($max_mem max)</td>
</tr>
<tr>
<td>Disk</td>
</tr>
<tr>
<td>Disk</td>
- <td><input type="text" name="disk" value="$maxdisk" size=3/> gigabytes ($maxdisk max)</td>
+ <td><input type="text" name="disk" value="$default_disk" size=3/> gigabytes (${"%0.1f" % ($max_disk-0.05)} max)</td>
</tr>
<tr>
</tr>
<tr>
- <td>HVM/ParaVM</td>
+ <td>HVM/ParaVM$helppopup('hvm_paravm')</td>
<td>
<input checked type="radio" name="vmtype" value="hvm">HVM</input>
<input type="radio" name="vmtype" value="paravm">ParaVM</input>
<td>
<input checked type="radio" name="vmtype" value="hvm">HVM</input>
<input type="radio" name="vmtype" value="paravm">ParaVM</input>
@@
-101,5
+104,7
@@
off#slurp
</table>
<input type="submit" class="button" value="Create it!"/>
</form>
</table>
<input type="submit" class="button" value="Create it!"/>
</form>
-
+#else
+<p>You are at the maximum number of VMs.</p>
+#end if
#end def
#end def