From 556e06cc3d159c9b1b207a55d3f35f7d0ba048c6 Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Tue, 30 Jan 2024 11:20:56 +0100 Subject: Add list images action Add list images action that shows a list of all the images in each server and their properties --- ogcp/templates/actions/list_images.html | 41 +++++++++++++++++++++++++++++++++ ogcp/templates/images.html | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 ogcp/templates/actions/list_images.html (limited to 'ogcp/templates') 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 %} + +

{{_('List images')}}

+{% 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 }}) + + + + + + + + + + + {% for img in images %} + + + + + + + {% endfor %} + +
NameSize (MiB)Datasize (MiB)Last update
{{img['name']}}{{img['size'] / 1024 ** 2}}{{img['datasize'] / 1024 ** 2}}{{img['modified']}}
+ {% 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 %} + {% if btn_back %} -- cgit v1.2.3-18-g5258