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
master
Javier Hernandez 2023-12-12 10:53:59 +01:00 committed by OpenGnSys Support Team
parent c66871f3ce
commit 84bcdb3cae
2 changed files with 2 additions and 2 deletions

View File

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

View File

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