summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-26 11:23:25 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-26 13:21:13 +0200
commit39371747db933df2dbda89d5652addab8ef4c55d (patch)
treecf1fafe59ca257c7912a968bb0242ed608fa4368
parentc1d9018e2174a3144c6babba86b4959dd77448d2 (diff)
ogcp: improve cache report wording
Use "Cache size" instead of "Disk size" in cache inspector. Inform that the missing space when the image does not fit in cache is additional space on top of the available space.
-rw-r--r--ogcp/templates/cache_inspector.html2
-rw-r--r--ogcp/views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ogcp/templates/cache_inspector.html b/ogcp/templates/cache_inspector.html
index 8e64cd4..ce9703f 100644
--- a/ogcp/templates/cache_inspector.html
+++ b/ogcp/templates/cache_inspector.html
@@ -27,7 +27,7 @@
</ul>
<ul class="list-group list-group-horizontal">
<li class="list-group-item w-50">
- {{ _('Disk size') }}
+ {{ _('Cache size') }}
</li>
<li class="list-group-item w-50">
{{ _('used') }} (%)
diff --git a/ogcp/views.py b/ogcp/views.py
index c230288..75114b7 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -969,7 +969,7 @@ def image_fits_in_cache(server, clients_info, image):
free_cache = client_info['free_cache']
if free_cache < image_size:
missing_cache = image_size - free_cache
- err_report += f'{ip} requires {(missing_cache / (1024 ** 3)):.3f} free GiB<br>'
+ err_report += f'{ip} requires {(missing_cache / (1024 ** 3)):.3f} more free GiB<br>'
if err_report:
flash(f'No space left on cache:<br>{err_report}', category='error')