summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/dashboard.html
blob: 0f022c3b5e2c03369343bc463320ea04099ceadc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends 'base.html' %}

{% block content %}
<div class="row">
  <div class="m-4 w-25 card text-center">
    <div class="card-header">
      Connected clients (ogClient)
    </div>
    <div class="card-body">
      <p class="card-text">{{ clients['clients'] | length }}</p>
    </div>
  </div>
  <div class="m-4 w-25 card text-center">
    <div class="card-header">
      Disk stats
    </div>
    <div class="card-body">
      <ul class="list-group list-group-horizontal">
        <li class="list-group-item w-50">
          Disk size
        </li>
        <li class="list-group-item w-50">
          used
        </li>
        <li class="list-group-item w-50">
          available
        </li>
        <li class="list-group-item w-50">
          use(%)
        </li>
      </ul>
      <ul class="list-group list-group-horizontal">
        <li class="list-group-item w-50">
          {{ disk['total'] // 2**30 }} Gbytes
        </li>
        <li class="list-group-item w-50">
          {{ (disk['total'] - disk['free']) // 2**30 }} Gbytes
        </li>
        <li class="list-group-item w-50">
          {{ disk['free'] // 2**30 }} Gbytes
        </li>
        <li class="list-group-item w-50">
          {{ (((disk['total'] - disk['free']) / disk['total']) * 100)|int }}%
        </li>
      </ul>
    </div>
    <div class="card-header">
      Number of images
    </div>
    <div class="card-body">
      <p class="card-text">{{ images | length }}</p>
    </div>
  </div>
  <div class="m-4 w-25 card text-center">
    <div class="card-header">
      Latest images
    </div>
      {% for image in images[:10] %}
        <ul class="list-group list-group-horizontal">
          <li class="list-group-item w-50">
            {{ image['name'] }}
          </li>
          <li class="list-group-item w-50">
            {{ image['modified'] }}
          </li>
        </ul>
      {% endfor %}
  </div>
</div>
{% endblock %}