mirror of https://git.48k.eu/ogcp
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
parent
c1d9018e21
commit
39371747db
|
@ -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') }} (%)
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue