From 2ae6f37e60955521eb8637127b37c76c19a7f607 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Wed, 19 Jun 2024 10:55:23 +0200 Subject: views: improve cache check messages in image/restore Improve the wording of the error message reporting the clients without enough cache to hold the image to be restored. --- ogcp/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ogcp') diff --git a/ogcp/views.py b/ogcp/views.py index ced0b0f..b2c1994 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -767,10 +767,10 @@ def image_fits_in_cache(server, ips, image_size): free_cache = cache_size - used_cache if free_cache < image_size: missing_cache = image_size - free_cache - err_report += f'{ip}: needs {(missing_cache / (1024 ** 3)):.3f} free GiB
' + err_report += f'{ip} requires {(missing_cache / (1024 ** 3)):.3f} free GiB
' if err_report: - flash(f'Client cache error:
{err_report}', category='error') + flash(f'No space left on cache:
{err_report}', category='error') return False return True -- cgit v1.2.3-18-g5258