diff options
author | Javier Hernandez <jhernandez@soleta.eu> | 2024-02-02 12:30:47 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-02-02 12:48:28 +0100 |
commit | 6a134b63372311706f174516a45ad2af8c7ff225 (patch) | |
tree | 1a94436177fb5c96a461ff2b783a0797435e69d0 /ogcp/templates/actions/list_images.html | |
parent | a41ad5eec6cefe540cbb5c4a5454c0c4ae24bf1c (diff) |
Make list_images show only selected images
Make list images command show only information of the images the user
has selected in the sidebar.
Improve readability of the information.
Show size and data size attributes rounded
Warn the user if no images have been selected in sidebar
Diffstat (limited to 'ogcp/templates/actions/list_images.html')
-rw-r--r-- | ogcp/templates/actions/list_images.html | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/ogcp/templates/actions/list_images.html b/ogcp/templates/actions/list_images.html index e2f5633..694036f 100644 --- a/ogcp/templates/actions/list_images.html +++ b/ogcp/templates/actions/list_images.html @@ -6,15 +6,11 @@ {% 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"> +{% for server in servers %} + <h3 class="mx-5">Server: {{server['name']}}</h3> + {% for repo, images in server['repos'] %} + <h4 class="mx-5">Repo: {{repo}}</h4> + <table class="table table-hover mx-5"> <thead class="thead-light"> <tr> <th>Name</th> @@ -27,14 +23,13 @@ {% for img in images %} <tr> <th>{{img['name']}}</th> - <td>{{img['size'] / 1024 ** 2}}</td> - <td>{{img['datasize'] / 1024 ** 2}}</td> + <td>{{(img['size'] / 1024 ** 2) |round(2, 'floor')}}</td> + <td>{{(img['datasize'] / 1024 ** 2) |round(2, 'floor')}}</td> <td>{{img['modified']}}</td> </tr> {% endfor %} </tbody> </table> - {% endif %} {% endfor %} {% endfor %} |