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.
master
Alejandro Sirgo Rica 2024-09-26 11:23:25 +02:00
parent c1d9018e21
commit 39371747db
2 changed files with 2 additions and 2 deletions

View File

@ -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') }} (%)

View File

@ -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')