From 8654b4b02fee18aa8a62461817c710a805659d22 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 21 Apr 2021 13:11:39 +0200 Subject: [PATCH] ui: size-field: add more units MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This would probably benefit from being an object alá: ``` 'GiB': { base: 2, order: 30, }, ``` but that would be a transparent internal change, and the current way isn't yet a limitation, so ... Signed-off-by: Thomas Lamprecht --- www/manager6/form/BandwidthSelector.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/manager6/form/BandwidthSelector.js b/www/manager6/form/BandwidthSelector.js index 84c5ab351..651b175aa 100644 --- a/www/manager6/form/BandwidthSelector.js +++ b/www/manager6/form/BandwidthSelector.js @@ -22,12 +22,15 @@ Ext.define('PVE.form.SizeField', { }, units: { + 'B': 1, 'KiB': 1024, 'MiB': 1024*1024, 'GiB': 1024*1024*1024, + 'TiB': 1024*1024*1024*1024, 'KB': 1000, 'MB': 1000*1000, 'GB': 1000*1000*1000, + 'TB': 1000*1000*1000*1000, }, // display unit (TODO: make (optionally) selectable)