From: Michael Tremer Date: Fri, 30 Sep 2011 21:33:14 +0000 (+0200) Subject: fireinfo: Some design fixes for ARM. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=626a896b0f604069e22a15d3ad493d23cb782712;p=ipfire.org.git fireinfo: Some design fixes for ARM. --- diff --git a/www/templates/stasy-profile-detail.html b/www/templates/stasy-profile-detail.html index a444095a..b71aa05c 100644 --- a/www/templates/stasy-profile-detail.html +++ b/www/templates/stasy-profile-detail.html @@ -140,43 +140,48 @@ {{ _("Speed") }} - {{ profile.cpu.speed }} MHz (Bogomips: {{ profile.cpu.bogomips }}) + {{ profile.cpu.speed }} MHz + {% if profile.cpu.speed != profile.cpu.bogomips %} + (Bogomips: {{ profile.cpu.bogomips }}) + {% end %} - - - {{ _("Supported features") }} - - - - - {% if profile.cpu.capable_64bit %} - + + - + {% if profile.cpu.capable_pae %} + +
- {% else %} - - {% end %} - {{ _("64 bit") }} - - - {% if profile.cpu.capable_pae %} - - {% else %} - - {% end %} - {{ _("PAE") }} - + {% if profile.cpu.vendor != "ARM" %} +
+ {{ _("Supported features") }} + + + + {% if profile.cpu.capable_64bit %} + -
+ {% else %} + + {% end %} + {{ _("64 bit") }} + - {% if profile.cpu.capable_virt %} - - {% else %} - - {% end %} - {{ _("VT-x/AMD-V") }} - -
-
+ {% else %} + + {% end %} + {{ _("PAE") }} + + + {% if profile.cpu.capable_virt %} + + {% else %} + + {% end %} + {{ _("VT-x/AMD-V") }} + +
+ + + {% end %} {{ _("Memory") }} diff --git a/www/webapp/backend/stasy.py b/www/webapp/backend/stasy.py index 192d20f3..ca6b5ce4 100644 --- a/www/webapp/backend/stasy.py +++ b/www/webapp/backend/stasy.py @@ -60,6 +60,9 @@ CPU_STRINGS = ( # Qemu (r"QEMU Virtual CPU version .*", r"QEMU CPU"), + + # ARM + (r"Feroceon .*", r"ARM Feroceon"), ) CPU_CORES = range(1, 9) @@ -82,7 +85,14 @@ class ProfileCPU(ProfileDict): @property def speed(self): - return self._data.get("speed") + speed = self._data.get("speed") + + # ARM boxes do not report speed but + # bogomips equals speed + if not speed: + return self.bogomips + + return speed @property def friendly_speed(self): @@ -135,7 +145,12 @@ class ProfileCPU(ProfileDict): @property def friendly_string(self): - return "%s @ %s" % (self.friendly_vendor, self.friendly_speed) + s = self.friendly_vendor + + if self.speed: + s += " @ %s" % self.friendly_speed + + return s class ProfileHypervisor(ProfileDict):