Changeset 535 for trunk/packages/sipb-xen-www/code/main.py
- Timestamp:
- May 15, 2008, 9:55:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-www/code/main.py
r516 r535 197 197 def getListDict(user): 198 198 """Gets the list of local variables used by list.tmpl.""" 199 checkpoint.checkpoint('Starting') 199 200 machines = g.machines 200 201 checkpoint.checkpoint('Got my machines') 201 202 on = {} 202 203 has_vnc = {} 203 on = g.uptimes204 xmlist = g.xmlist 204 205 checkpoint.checkpoint('Got uptimes') 205 206 for m in machines: 206 m.uptime = g.uptimes.get(m) 207 if not on[m]: 207 if m not in xmlist: 208 208 has_vnc[m] = 'Off' 209 elif m.type.hvm: 210 has_vnc[m] = True 209 m.uptime = None 211 210 else: 212 has_vnc[m] = "ParaVM"+helppopup("paravm_console") 211 m.uptime = xmlist[m]['uptime'] 212 if xmlist[m]['console']: 213 has_vnc[m] = True 214 elif m.type.hvm: 215 has_vnc[m] = "WTF?" 216 else: 217 has_vnc[m] = "ParaVM"+helppopup("paravm_console") 213 218 max_memory = validation.maxMemory(user) 214 219 max_disk = validation.maxDisk(user) … … 228 233 defaults=defaults, 229 234 machines=machines, 230 has_vnc=has_vnc, 231 uptimes=g.uptimes) 235 has_vnc=has_vnc) 232 236 return d 233 237 … … 652 656 checkpoint.checkpoint('output as a string') 653 657 print output_string 654 print '<!-- <pre>%s</pre> -->' % checkpoint 658 if fields.has_key('timedebug'): 659 print '<pre>%s</pre>' % checkpoint 655 660 except Exception, err: 656 661 if not fields.has_key('js'): … … 676 681 if __name__ == '__main__': 677 682 fields = cgi.FieldStorage() 683 684 if fields.has_key('sqldebug'): 685 import logging 686 logging.basicConfig() 687 logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) 688 logging.getLogger('sqlalchemy.orm.unitofwork').setLevel(logging.INFO) 689 678 690 u = getUser() 679 691 g.user = u
Note: See TracChangeset
for help on using the changeset viewer.