From 84bcdb3cae1ea13cc20bbf88dd9670733f44c02d Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Tue, 12 Dec 2023 10:53:59 +0100 Subject: Change Image-details' 'Datasize' unit to MiB Change the Image details form to display the 'Datasize' field of the image in MiB instead of GiB --- ogcp/forms/action_forms.py | 2 +- ogcp/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index c15d254..ab5a011 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -194,7 +194,7 @@ class DeleteRoomForm(FlaskForm): class ImageDetailsForm(FlaskForm): name = StringField(label=_l('Name')) size = DecimalField(label=_l('Size (MiB)')) - datasize = DecimalField(label=_l('Datasize (GiB)')) + datasize = DecimalField(label=_l('Datasize (MiB)')) modified = StringField(label=_l('Last update')) permissions = StringField(label=_l('Permissions')) software_id = StringField(label=_l('Software id')) diff --git a/ogcp/views.py b/ogcp/views.py index e8c5edf..2828d4a 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -1924,7 +1924,7 @@ def action_image_info(): form.name.data = image['name'] # Bytes to Mebibytes form.size.data = image['size'] / 1024 ** 2 - form.datasize.data = image['datasize'] / 1024 ** 3 + form.datasize.data = image['datasize'] / 1024 ** 2 form.modified.data = image['modified'] form.permissions.data = image['permissions'] form.software_id.data = image['software_id'] -- cgit v1.2.3-18-g5258