summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-07-11 11:59:03 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-07-12 09:11:28 +0200
commitb5cb42006e0376383f31d473eec3697c332a65a3 (patch)
tree2f1894a72775012ca05cdd8aef6322f6df0ae051
parent514201e6a139da70de17530ce05c5cc72e79d65f (diff)
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.
-rw-r--r--ogcp/templates/actions/cache.html1
-rw-r--r--ogcp/views.py1
2 files changed, 2 insertions, 0 deletions
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() }}
<b>{{ image.image_name.data }} ({{ (images_data[image.selected.label.text]['size'] | int / 2**20)|round(3) }} MiB)</b>
+ <div>∘︎ Checksum: {{images_data[image.selected.label.text]['checksum']}}</div>
</td>
<td>
{% 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,