else:
main_status = dict(status[1:])
main_status['host'] = controls.listHost(machine)
- start_time = float(main_status.get('start_time', 0))
- uptime = datetime.timedelta(seconds=int(time.time()-start_time))
+ start_time = main_status.get('start_time')
+ if start_time is None:
+ uptime = "Still booting?"
+ else:
+ start_time = float(start_time)
+ uptime = datetime.timedelta(seconds=int(time.time()-start_time))
cpu_time_float = float(main_status.get('cpu_time', 0))
cputime = datetime.timedelta(seconds=int(cpu_time_float))
display_fields = [('name', 'Name'),
</%def>
<%def name="machineRow(machine, dark)">
+<%
+ on = (machine.uptime is not None)
+%>
<tr\
% if dark:
class="stripedrow" \
% endif
>
<td rowspan="2">
- % if machine.uptime and installing[machine]:
+ % if on and installing[machine]:
<img src="static/power_installing.png" alt="Installing..." />
% else:
- <form action="machine/${machine.machine_id}/command/${'shutdown' if machine.uptime else 'create'}" method="post">
+ <form action="machine/${machine.machine_id}/command/${'shutdown' if on else 'create'}" method="post">
<input type="hidden" name="back" value="list"/>
<input type="hidden" name="machine_id"
value="${machine.machine_id}"/>
-<input type="submit" class="power ${'on' if machine.uptime else 'off'}" name="action" value="${'Shutdown' if machine.uptime else 'Power on'}"\
-% if machine.uptime:
+<input type="submit" class="power ${'on' if on else 'off'}" name="action" value="${'Shutdown' if on else 'Power on'}"\
+% if on:
onclick="return confirm('Are you sure you want to power off this VM?');"
% endif
/>
<td></td>
% endif
<td>\
-% if machine.uptime:
+% if on:
${datetime.timedelta(seconds=int(machine.uptime))}\
% endif
</td>
+invirt-web (0.1.22) unstable; urgency=low
+
+ * Handle domains spinning in pygrub
+
+ -- Quentin Smith <quentin@mit.edu> Thu, 24 Nov 2011 20:42:09 -0500
+
invirt-web (0.1.21) unstable; urgency=low
* Fix strict validation of description field