From 372efc192b0054e07e6e7107a3049166ea2c5b78 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 16 Dec 2010 17:35:07 +0100 Subject: [PATCH] Initial import of fireinfo display. --- www/templates/modules/stasy-table.html | 8 + www/templates/stasy-profile.html | 112 ++++++-- www/templates/stasy-stats-cpus.html | 7 + www/templates/stasy-stats-virtual.html | 9 + www/templates/stasy-stats.html | 2 + www/webapp/__init__.py | 3 + www/webapp/backend/__init__.py | 1 + www/webapp/backend/stasy.py | 337 +++++++++++++++++++++++++ www/webapp/handlers_stasy.py | 15 ++ www/webapp/stasy.py | 179 ------------- www/webapp/ui_modules.py | 18 ++ 11 files changed, 495 insertions(+), 196 deletions(-) create mode 100644 www/templates/modules/stasy-table.html create mode 100644 www/templates/stasy-stats-cpus.html create mode 100644 www/templates/stasy-stats-virtual.html create mode 100644 www/templates/stasy-stats.html create mode 100644 www/webapp/backend/stasy.py delete mode 100644 www/webapp/stasy.py diff --git a/www/templates/modules/stasy-table.html b/www/templates/modules/stasy-table.html new file mode 100644 index 0000000..267179a --- /dev/null +++ b/www/templates/modules/stasy-table.html @@ -0,0 +1,8 @@ + + {% for k, v in items %} + + + + + {% end %} +
{{ k }}{{ "%.2f" % v }}%
diff --git a/www/templates/stasy-profile.html b/www/templates/stasy-profile.html index 15ed6c5..a3b4133 100644 --- a/www/templates/stasy-profile.html +++ b/www/templates/stasy-profile.html @@ -24,7 +24,7 @@ {{ _("Architecture") }} - {{ profile.arch }} + {{ profile.cpu.arch }} @@ -36,6 +36,37 @@ + + {% if profile.hypervisor %} +

{{ _("Hypervisor") }}

+ + + + + + + + + + + + + + +
+ {{ _("Vendor") }} + + {{ profile.hypervisor.vendor }} +
+ {{ _("Model") }} + + {{ profile.hypervisor.model or _("Unknown") }} +
+ {{ _("Type") }} + + {{ profile.hypervisor.type }} +
+ {% end %}

{{ _("Hardware") }}

@@ -49,7 +80,7 @@ {{ _("Vendor") }} @@ -57,9 +88,10 @@ {{ _("Model") }} + + + + + + + + + + + + + + - {% for device in profile.devices %} - - - - - {% end %} + + +
- {{ profile.cpu.vendor }} + {{ profile.cpu.vendor }}
- - {{ profile.cpu._data.get("model_string", _("Not available")) }} + {{ profile.cpu.model_string or _("Not available") }}
+ {{ _("Supports x86_64") }} + + {% if profile.cpu.capable_64bit %} + YES + {% else %} + NO + {% end %} +
+ {{ _("Supports PAE") }} + + {% if profile.cpu.capable_pae %} + YES + {% else %} + NO + {% end %} +
+ {{ _("Supports VT-x/AMD-V") }} + + {% if profile.cpu.capable_virt %} + YES + {% else %} + NO + {% end %} +
{{ _("Memory") }} @@ -99,19 +168,28 @@ {{ _("Devices") }}
- {{ device.subsystem.upper() }} - - {{ device.vendor }}:{{ device.model }} • - {{ device.vendor_string }} - {{ device.model_string }} -
+ + {% for device in profile.devices %} + + + + + + + {% end %} +
+ {{ device.subsystem.upper() }} + + {{ device.vendor_string }} + + {{ device.model_string }} + + {{ device.driver or " " }} +
+