column-monitor.html 1.12 KB
Newer Older
1
{% load sizefieldtags %}
2 3
{% load i18n %}

4
<span class="{% if not record.enabled %}node-disabled{% endif %}"></span>
5
<i class="fa fa-gears"></i> {% trans "CPU" %}
6
<div class="progress pull-right">
7
  <div class="progress-bar progress-bar-success" role="progressbar"
8 9 10 11 12
    aria-valuenow="{{ record.cpu_usage|stringformat:"f" }}"
    aria-valuemin="0" aria-valuemax="1"
    style="width: {% widthratio record.cpu_usage 1 100 %}%;">
    <span class="progress-bar-text">
      {% if record.cpu_usage != None %}
Bach Dániel committed
13
        {% widthratio record.cpu_usage 1 100 %} %
14 15 16
      {% else %}
        -
      {% endif %}
17
    </span>
18
  </div>
19 20
</div>

21
<br>
22

23
<i class="fa fa-ticket"></i> {% trans "Memory" %}
24
<div class="progress pull-right">
25 26 27 28 29 30 31 32 33 34 35
  <div class="progress-bar" role="progressbar"
    aria-valuenow="{{ record.ram_usage|stringformat:"f" }}"
    aria-valuemin="0" aria-valuemax="100"
    style="width: {% widthratio record.ram_usage 1 100 %}%;">
    <span class="progress-bar-text">
      {% if record.byte_ram_usage != None %}
        {% widthratio record.byte_ram_usage 1048576 1 %} MB
      {% else %}
        -
      {% endif %}
    </span>
36
  </div>
37
</div>