From bc2c23e470e232b2a87cad3c826fcf4c07dc9d62 Mon Sep 17 00:00:00 2001 From: Eric Price Date: Tue, 9 Oct 2007 02:31:30 -0400 Subject: [PATCH 1/1] For new naming scheme. svn path=/trunk/web/; revision=147 --- templates/info.tmpl | 2 +- templates/main.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/info.tmpl b/templates/info.tmpl index f537dd2..46767b2 100644 --- a/templates/info.tmpl +++ b/templates/info.tmpl @@ -69,7 +69,7 @@ Info on $machine.name #end if #if not $on Ram:MB (max $max_mem) - Disk:GB (max $max_disk) + Disk:GB (max $max_disk)WARNING: Modifying disk size may corrupt your data. #end if 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)) -- 1.7.9.5