summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/actions/list_images.html41
-rw-r--r--ogcp/templates/images.html2
2 files changed, 43 insertions, 0 deletions
diff --git a/ogcp/templates/actions/list_images.html b/ogcp/templates/actions/list_images.html
new file mode 100644
index 0000000..e2f5633
--- /dev/null
+++ b/ogcp/templates/actions/list_images.html
@@ -0,0 +1,41 @@
+{% extends 'images.html' %}
+{% import "bootstrap/wtf.html" as wtf %}
+
+{% set btn_back = true %}
+
+{% block content %}
+
+<h1 class="m-5">{{_('List images')}}</h1>
+{% for r in responses %}
+ {% set server = r['server']['name']%}
+ {% set repos = r['repos'] %}
+ {% for repo in repos.values() %}
+ {% set repo_name = repo['name'] %}
+ {% set images = repo['images'] %}
+ {% if images %}
+ {{ repo_name }} ({{ server }})
+ <table class="table table-hover">
+ <thead class="thead-light">
+ <tr>
+ <th>Name</th>
+ <th>Size (MiB)</th>
+ <th>Datasize (MiB)</th>
+ <th>Last update</th>
+ </tr>
+ </thead>
+ <tbody class="text-left">
+ {% for img in images %}
+ <tr>
+ <th>{{img['name']}}</th>
+ <td>{{img['size'] / 1024 ** 2}}</td>
+ <td>{{img['datasize'] / 1024 ** 2}}</td>
+ <td>{{img['modified']}}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% endif %}
+ {% endfor %}
+{% endfor %}
+
+{% endblock %}
diff --git a/ogcp/templates/images.html b/ogcp/templates/images.html
index 2a50d39..c0b4359 100644
--- a/ogcp/templates/images.html
+++ b/ogcp/templates/images.html
@@ -60,6 +60,8 @@
{% block commands %}
<input class="btn btn-light" type="submit" value="{{ _('Image details') }}"
form="imagesForm" formaction="{{ url_for('action_image_info') }}" formmethod="get">
+ <input class="btn btn-light" type="submit" value="{{ _('List images') }}"
+ form="imagesForm" formaction="{{ url_for('action_image_list') }}" formmethod="get">
<input class="btn btn-light" type="submit" value="{{ _('Delete image') }}"
form="imagesForm" formaction="{{ url_for('action_image_delete') }}" formmethod="get">
{% if btn_back %}