Ignore:
Timestamp:
Dec 20, 2009, 9:45:14 PM (14 years ago)
Author:
broder
Message:

Make commands work from list and info pages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy-rebased/code/templates/list.mako

    r2682 r2684  
    8585      <tr>
    8686        <td rowspan="2">
    87           <form action="command" method="post">
     87          <form action="machine/${machine.machine_id}/command/${'shutdown' if machine.uptime else 'create'}" method="post">
    8888            <input type="hidden" name="back" value="list"/>
    8989            <input type="hidden" name="machine_id"
    9090                   value="${machine.machine_id}"/>
    91 <input type="submit" class="power ${'on' if machine.uptime else 'off'}" name="action" value="${'Power off' if machine.uptime else 'Power on'}"\
     91<input type="submit" class="power ${'on' if machine.uptime else 'off'}" name="action" value="${'Shutdown' if machine.uptime else 'Power on'}"\
    9292% if machine.uptime:
    9393 onclick="return confirm('Are you sure you want to power off this VM?');"
Note: See TracChangeset for help on using the changeset viewer.