X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/5e39ab04460b7d8197bc981a2d9198fcf97750ad..bc2c23e470e232b2a87cad3c826fcf4c07dc9d62:/templates/main.py?ds=sidebyside diff --git a/templates/main.py b/templates/main.py index 152cd75..984f3b8 100755 --- a/templates/main.py +++ b/templates/main.py @@ -212,7 +212,7 @@ def getUptimes(machines): value_string = remctl('web', 'listvms') lines = value_string.splitlines() d = {} - for line in lines[1:]: + for line in lines: lst = line.split() name, id = lst[:2] uptime = ' '.join(lst[2:]) @@ -592,6 +592,7 @@ def info(user, fields): ] fields = [] machine_info = {} + machine_info['name'] = machine.name machine_info['type'] = machine.type.hvm and 'HVM' or 'ParaVM' machine_info['owner'] = machine.owner machine_info['contact'] = machine.contact @@ -608,10 +609,10 @@ def info(user, fields): for field, disp in display_fields: if field in ('uptime', 'cputime'): fields.append((disp, locals()[field])) - elif field in main_status: - fields.append((disp, main_status[field])) elif field in machine_info: fields.append((disp, machine_info[field])) + elif field in main_status: + fields.append((disp, main_status[field])) else: pass #fields.append((disp, None))