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

Make commands work from list and info pages

Location:
package_branches/invirt-web/cherrypy-rebased/code/templates
Files:
1 added
1 deleted
2 edited

Legend:

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

    r2683 r2684  
    2929<%def name="command_button(title, value, cdrom=False, extra='')">
    3030<form action="machine/${machine.machine_id}/command/${value}" method="POST">
    31   <input type="hidden" name="back" value="machine/${machine.machine_id}/info" />
     31  <input type="hidden" name="back" value="info" />
    3232  <input type="submit" class="button" name="action" value="${title}" ${extra | n}/>
    3333% if cdrom:
  • 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.