]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blobdiff - templates/fireinfo/stats-memory.html
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire.org
[people/shoehn/ipfire.org.git] / templates / fireinfo / stats-memory.html
index ec922b0d05cfda90f73231b9d7b4ba9fc54ca6d5..7f42ee9b7d972afe781989e4eb99e6e4b04c8ee6 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "../base.html" %}
 
 {% block title %}{{ _("Memory") }}{% end block %}
 
@@ -8,11 +8,36 @@
        </div>
 
        <div class="row">
-               <div class="col-lg-12 col-md-12">
-                       <p>
-                               {{ _("The average amount of memory of all systems in the database is: <strong>%.2f MB</strong>.") % average_memory }}
-                       </p>
-                       {% module StasyTable(memory) %}
+               <div class="col-md-2 col-md-offset-2 ac">
+                       <small class="text-muted">({{ _("minimum") }})</small>
+                       <h3>{{ "%.0f" % (mem_min / 1024) }} {{ _("MB") }}</h3>
+               </div>
+               <div class="col-md-4 ac">
+                       <small class="text-muted">({{ _("average") }})</small>
+                       <h1 class="text-success">{{ "%.0f" % (mem_avg / 1024) }} {{ _("MB") }}</h1>
+               </div>
+               <div class="col-md-2 ac">
+                       <small class="text-muted">({{ _("maximum") }})</small>
+                       <h3>{{ "%.0f" % (mem_max / 1024) }} {{ _("MB") }}</h3>
                </div>
        </div>
+
+       <hr>
+
+       <dl class="dl-horizonal">
+               {% for amount, percentage in amounts %}
+                       {% if percentage >= 0.01 %}
+                               <dt>{{ _(">= %d MB") % amount }}</dt>
+                               <dd>
+                                       {% if amount <= 256 %}
+                                               {% module ProgressBar(percentage, "danger") %}
+                                       {% elif amount >= 1024 %}
+                                               {% module ProgressBar(percentage, "success") %}
+                                       {% else %}
+                                               {% module ProgressBar(percentage, "warning") %}
+                                       {% end %}
+                               </dd>
+                       {% end %}
+               {% end %}
+       </dl>
 {% end block %}