summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-12-12 10:53:59 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-12 11:00:19 +0100
commit84bcdb3cae1ea13cc20bbf88dd9670733f44c02d (patch)
treecbd84160a929210f21a220af0f7282f8df891151
parentc66871f3ce01aafb9e94f3ed2ca72811a464f5c5 (diff)
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
-rw-r--r--ogcp/forms/action_forms.py2
-rw-r--r--ogcp/views.py2
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']