Changeset 2683 for package_branches
- Timestamp:
- Dec 20, 2009, 9:45:09 PM (15 years ago)
- Location:
- package_branches/invirt-web/cherrypy-rebased/code
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy-rebased/code/static/style.css
r1318 r2683 105 105 padding: 0.1em 0.5em; 106 106 } 107 108 form { 109 display: inline; 110 } -
package_branches/invirt-web/cherrypy-rebased/code/templates/info.mako
r2678 r2683 27 27 % endif 28 28 % endif 29 <form action="command" method="POST"> 30 <input type="hidden" name="back" value="info"/> 31 <input type="hidden" name="machine_id" value="${machine.machine_id}"/> 29 <%def name="command_button(title, value, cdrom=False, extra='')"> 30 <form action="machine/${machine.machine_id}/command/${value}" method="POST"> 31 <input type="hidden" name="back" value="machine/${machine.machine_id}/info" /> 32 <input type="submit" class="button" name="action" value="${title}" ${extra | n}/> 33 % if cdrom: 34 Boot CD: ${self.fn.cdromList()} 35 % endif 36 </form> 37 </%def> 32 38 <div> 33 39 % if on: 34 <button type="submit" class="button" name="action" value="Power off">Power off (hard)</button>35 <button type="submit" class="button" name="action" value="Shutdown">Shut down</button>36 <input type="submit" class="button" name="action" value="Reboot"/>40 ${command_button("Power off", "destroy")} 41 ${command_button("Shutdown", "shutdown")} 42 ${command_button("Reboot", "reboot", cdrom=True)} 37 43 % else: 38 <input type="submit" class="button" name="action" value="Power on"/>44 ${command_button("Power on", "create", cdrom=True)} 39 45 % endif 40 46 </div> 41 47 <div> 42 Boot CD: 43 ${self.fn.cdromList()} 44 </div> 45 <div> 46 <input type="submit" class="button" name="action" value="Delete VM" onclick="return confirm('Are you sure that you want to delete this VM?');"/> 48 ${command_button("Delete VM", "delete", extra='''onclick="return confirm('Are you sure that you want to delete this VM?');"''')} 47 49 </div> 48 50 </form>
Note: See TracChangeset
for help on using the changeset viewer.