Changeset 2687 for package_branches/invirt-web/cherrypy-rebased
- Timestamp:
- Dec 20, 2009, 9:45:26 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/main.py
r2686 r2687 148 148 149 149 def parseCreate(self, fields): 150 kws = dict([(kw, fields.get(kw)) for kw in 'name description owner memory disksize vmtype cdrom autoinstall'.split() ])150 kws = dict([(kw, fields.get(kw)) for kw in 'name description owner memory disksize vmtype cdrom autoinstall'.split() if fields.get(kw)]) 151 151 validate = validation.Validate(cherrypy.request.login, cherrypy.request.state, strict=True, **kws) 152 152 return dict(contact=cherrypy.request.login, name=validate.name, description=validate.description, memory=validate.memory, … … 375 375 on = {} 376 376 has_vnc = {} 377 installing = {} 377 378 xmlist = state.xmlist 378 379 checkpoint.checkpoint('Got uptimes') 379 can_clone = 'ice3' not in state.xmlist_raw380 380 for m in machines: 381 381 if m not in xmlist: … … 390 390 else: 391 391 has_vnc[m] = "ParaVM" 392 if xmlist[m].get('autoinstall'): 393 installing[m] = True 394 else: 395 installing[m] = False 392 396 max_memory = validation.maxMemory(username, state) 393 397 max_disk = validation.maxDisk(username) … … 407 411 machines=machines, 408 412 has_vnc=has_vnc, 409 can_clone=can_clone)413 installing=installing) 410 414 return d 411 415 -
package_branches/invirt-web/cherrypy-rebased/code/templates/list.mako
r2684 r2687 85 85 <tr> 86 86 <td rowspan="2"> 87 % if machine.uptime and installing[machine]: 88 <img src="static/power_installing.png" alt="Installing..." /> 89 % else: 87 90 <form action="machine/${machine.machine_id}/command/${'shutdown' if machine.uptime else 'create'}" method="post"> 88 91 <input type="hidden" name="back" value="list"/> … … 95 98 /> 96 99 </form> 100 % endif 97 101 </td> 98 102 <td><a href="machine/${machine.machine_id}">${machine.name}</a></td>
Note: See TracChangeset
for help on using the changeset viewer.