mirror of https://git.48k.eu/ogcp
image: rename and remove fields
- remove field image 'id' - change size to display MiB instead of GiB - replace 'Modified' with 'Last update'master v1.1.3-4
parent
9fa90e0593
commit
ad41a0dfbe
|
@ -186,11 +186,10 @@ class DeleteRoomForm(FlaskForm):
|
|||
submit = SubmitField(label=_l('Submit'))
|
||||
|
||||
class ImageDetailsForm(FlaskForm):
|
||||
id = StringField(label=_l('Id'))
|
||||
name = StringField(label=_l('Name'))
|
||||
size = DecimalField(label=_l('Size (GiB)'))
|
||||
size = DecimalField(label=_l('Size (MiB)'))
|
||||
datasize = DecimalField(label=_l('Datasize (GiB)'))
|
||||
modified = StringField(label=_l('Modified'))
|
||||
modified = StringField(label=_l('Last update'))
|
||||
permissions = StringField(label=_l('Permissions'))
|
||||
software_id = StringField(label=_l('Software id'))
|
||||
|
||||
|
|
|
@ -1792,10 +1792,9 @@ def action_image_info():
|
|||
images = r.json()['images']
|
||||
image = next(img for img in images if img['id'] == int(id))
|
||||
|
||||
form.id.data = image['id']
|
||||
form.name.data = image['name']
|
||||
# Bytes to Gibibytes
|
||||
form.size.data = image['size'] / 1024 ** 3
|
||||
# Bytes to Mebibytes
|
||||
form.size.data = image['size'] / 1024 ** 2
|
||||
form.datasize.data = image['datasize'] / 1024 ** 3
|
||||
form.modified.data = image['modified']
|
||||
form.permissions.data = image['permissions']
|
||||
|
|
Loading…
Reference in New Issue