From b5cb42006e0376383f31d473eec3697c332a65a3 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Thu, 11 Jul 2024 11:59:03 +0200 Subject: ogcp: add checksum to images in Manage cache Ease detection of potential problems with images in cache. Show checksum under each image in the form. --- ogcp/templates/actions/cache.html | 1 + ogcp/views.py | 1 + 2 files changed, 2 insertions(+) diff --git a/ogcp/templates/actions/cache.html b/ogcp/templates/actions/cache.html index f9aaf68..46a8699 100644 --- a/ogcp/templates/actions/cache.html +++ b/ogcp/templates/actions/cache.html @@ -39,6 +39,7 @@ {{ image.image_name() }} {{ image.clients() }} {{ image.image_name.data }} ({{ (images_data[image.selected.label.text]['size'] | int / 2**20)|round(3) }} MiB) +
∘︎ Checksum: {{images_data[image.selected.label.text]['checksum']}}
{% for ip in images_data[image.selected.label.text]['clients'] %} diff --git a/ogcp/views.py b/ogcp/views.py index c1da3f0..8ece7db 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -1211,6 +1211,7 @@ def action_client_cache(): 'clients': [ip], 'size': int(image_info['size']), 'name': image_name, + 'checksum': checksum } storage_data[ip] = {'used': used_cache, -- cgit v1.2.3-18-g5258