<%def name="machineRow(machine)">
<tr>
<td rowspan="2">
- <form action="command" method="post">
+ % if machine.uptime 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">
<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="${'Power off' if machine.uptime else 'Power on'}"\
+<input type="submit" class="power ${'on' if machine.uptime else 'off'}" name="action" value="${'Shutdown' if machine.uptime else 'Power on'}"\
% if machine.uptime:
onclick="return confirm('Are you sure you want to power off this VM?');"
% endif
/>
</form>
+ % endif
</td>
<td><a href="machine/${machine.machine_id}">${machine.name}</a></td>
<td>${machine.memory}M</td>