summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-11-24 13:28:08 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-27 09:45:16 +0100
commitad41a0dfbeaa5b07ea454050af837de2d42d4bcd (patch)
treead8e6b83e0f5a9eec6540cda9616a408e36bb7a8 /ogcp/views.py
parent9fa90e059366047cb401e584b7ff6b0f34ac534e (diff)
image: rename and remove fieldsv1.1.3-4
- remove field image 'id' - change size to display MiB instead of GiB - replace 'Modified' with 'Last update'
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 86b27cb..551012f 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -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']