diff options
author | Javier Hernandez <jhernandez@soleta.eu> | 2024-01-30 11:20:56 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-01-30 11:29:57 +0100 |
commit | 556e06cc3d159c9b1b207a55d3f35f7d0ba048c6 (patch) | |
tree | 763a52e6f49bc9cfc4e0ca4e6778c19c57aa64fe /ogcp/templates/actions | |
parent | 5892d5c8c37ff412863afe2c9c6985f32276caf2 (diff) |
Add list images action
Add list images action that shows a list of all the images in each
server and their properties
Diffstat (limited to 'ogcp/templates/actions')
-rw-r--r-- | ogcp/templates/actions/list_images.html | 41 |
1 files changed, 41 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 %} |