summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-17 08:20:03 +0100
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-17 11:43:47 +0100
commitc8cf49bf6caaaf632b6ea7a9687270ac46a5ea56 (patch)
treec1b366bcaf31ba03a7cb481ee7cad729d20a6672
parent3283843d564a188190a3b4a453c1ea867910400f (diff)
Summarize dashboard information
* Rename "ogLives" to "ogLive images". * Move "Number of images" table to take less space. * Show storage data as "Storage size | Used (%) | Available (%)". * Move "Latest images" an "ogLive images" to the bottom.
-rw-r--r--ogcp/templates/dashboard.html102
1 files changed, 50 insertions, 52 deletions
diff --git a/ogcp/templates/dashboard.html b/ogcp/templates/dashboard.html
index 9e644a2..5187b15 100644
--- a/ogcp/templates/dashboard.html
+++ b/ogcp/templates/dashboard.html
@@ -29,25 +29,14 @@
<p class="card-text">{{ clients['clients'] | length }}</p>
</li>
</ul>
- </div>
-
- <!-- latest images -->
- <div class="col-{{ colsize }}">
- <div class="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>
+ <ul class="list-group list-group-horizontal">
+ <li class="list-group-item w-50">
+ {{ _('Number of images') }}
+ </li>
+ <li class="list-group-item w-50">
+ <p class="card-text">{{ images | length }}</p>
+ </li>
+ </ul>
</div>
<!-- disk stats -->
@@ -63,13 +52,10 @@
{{ _('Disk size') }}
</li>
<li class="list-group-item w-50">
- {{ _('used') }}
- </li>
- <li class="list-group-item w-50">
- {{ _('available') }}
+ {{ _('used') }} (%)
</li>
<li class="list-group-item w-50">
- {{ _('use') }}(%)
+ {{ _('available') }} (%)
</li>
</ul>
<ul class="list-group list-group-horizontal">
@@ -78,40 +64,14 @@
</li>
<li class="list-group-item w-50">
{{ (disk['total'] - disk['free']) // 2**30 }} Gbytes
+ ({{ (((disk['total'] - disk['free']) / disk['total']) * 100)|int }}%)
</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 }}%
+ ({{ ((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>
-
- <!-- ogLives -->
- <div class="col-{{ colsize }}">
- <div class="card text-center">
- <div class="card-header">
- ogLives
- </div>
- <ul class="list-group">
- {% for oglive in oglive_list['oglive'] %}
- <li class="list-group-item">
- {{ oglive['directory'] }}
- {% if loop.index0 == oglive_list['default'] %}
- ({{ _('default') }})
- {% endif %}
- </li>
- {% endfor %}
- </ul>
</div>
</div>
@@ -186,6 +146,44 @@
</div>
</div>
</div>
+
+ <!-- latest images -->
+ <div class="col-{{ colsize }}">
+ <div class="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>
+
+ <!-- ogLives -->
+ <div class="col-{{ colsize }}">
+ <div class="card text-center">
+ <div class="card-header">
+ {{ _('ogLive images') }}
+ </div>
+ <ul class="list-group">
+ {% for oglive in oglive_list['oglive'] %}
+ <li class="list-group-item">
+ {{ oglive['directory'] }}
+ {% if loop.index0 == oglive_list['default'] %}
+ ({{ _('default') }})
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
</div>
{% endblock %}