-{% extends "base.html" %}
+{% extends "../base.html" %}
{% block title %}{{ _("Memory") }}{% end block %}
</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 %}