]> git.ipfire.org Git - people/shoehn/ipfire.org.git/commitdiff
fireinfo: Display chart of CPUs with virtualization support.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 27 Dec 2010 20:18:56 +0000 (21:18 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 27 Dec 2010 20:18:56 +0000 (21:18 +0100)
www/templates/stasy-stats-cpu-flags.html
www/webapp/handlers_stasy.py

index 41771ac8bbacc7e2e9019ea5ce0046e9917600e2..1787bebd04f0badfe758c9e7ab8d2e51e2b3c6c7 100644 (file)
                the operating system configuration.
        </p>
 
-       <h4>{{ _("CPUs that support long mode") }}</h4>
+       <h4>{{ _("CPUs that support virtualization") }}</h4>
        <p>
                For future planning it is important to know if there is enough hardware
-               support for a 64bit version of IPFire.
+               support for virtualization like VT-x and AMD-V.
        </p>
-       {{ modules.StasyTable(cpus_lm, sortby="percentage") }}
+       {{ modules.StasyTable(cpus_virt, sortby="percentage") }}
 
        <h4>{{ _("CPUs with PAE") }}</h4>
        <p>
                This chart shows us which CPUs have got the PAE flag.
        </p>
        {{ modules.StasyTable(cpus_pae, sortby="percentage") }}
+
+       <h4>{{ _("CPUs that support long mode") }}</h4>
+       <p>
+               For future planning it is important to know if there is enough hardware
+               support for a 64bit version of IPFire.
+       </p>
+       {{ modules.StasyTable(cpus_lm, sortby="percentage") }}
 {% end block %}
index 6a66ee77bc574f914942b4e3e6659191233f4270..e561275384650c49bdb14f5dd23e91244bb446e3 100644 (file)
@@ -81,9 +81,17 @@ class StasyStatsCPUHandler(StasyBaseHandler):
 class StasyStatsCPUFlagsHandler(StasyBaseHandler):
        def get(self):
                kwargs = {}
+               
+               flags = (
+                       ("lm", "lm"),
+                       ("pae", "pae"),
+                       ("virt", ("vmx", "svm")),
+               )
+
+               for name, flag in flags:
+                       kwargs["cpus_" + name] = self.stasy.get_cpu_flag_map(flag)
 
-               for flag in ("lm", "pae"):
-                       kwargs["cpus_" + flag] = self.stasy.get_cpu_flag_map(flag)
+               print kwargs
 
                return self.render("stasy-stats-cpu-flags.html", **kwargs)