From 8af1fa54772f349a04f7537c92e8e482f4fee84f Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 17 May 2022 10:20:05 +0200 Subject: [PATCH] ui: use base 10 (SI) for all storage related displays matches what we do for (most) of such things in PVE since 7.0 there and also what the disk management gui shows, further disks are sold with SI units for their advertised capacity, so its more fitting there too. Signed-off-by: Thomas Lamprecht --- www/dashboard/DataStoreStatistics.js | 6 +++--- www/datastore/DataStoreListSummary.js | 4 ++-- www/datastore/Summary.js | 2 +- www/panel/NodeInfo.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/www/dashboard/DataStoreStatistics.js b/www/dashboard/DataStoreStatistics.js index 544f40da..38f7a2fe 100644 --- a/www/dashboard/DataStoreStatistics.js +++ b/www/dashboard/DataStoreStatistics.js @@ -81,21 +81,21 @@ Ext.define('PBS.DatastoreStatistics', { dataIndex: 'total', sortable: true, width: 90, - renderer: v => v === undefined || v < 0 ? '-' : Proxmox.Utils.format_size(v), + renderer: v => v === undefined || v < 0 ? '-' : Proxmox.Utils.format_size(v, true), }, { text: gettext('Used'), dataIndex: 'used', sortable: true, width: 90, - renderer: v => v === undefined || v < 0 ? '-' : Proxmox.Utils.format_size(v), + renderer: v => v === undefined || v < 0 ? '-' : Proxmox.Utils.format_size(v, true), }, { text: gettext('Available'), dataIndex: 'avail', sortable: true, width: 90, - renderer: v => v === undefined || v < 0 ? '-' : Proxmox.Utils.format_size(v), + renderer: v => v === undefined || v < 0 ? '-' : Proxmox.Utils.format_size(v, true), }, { text: gettext('Usage %'), diff --git a/www/datastore/DataStoreListSummary.js b/www/datastore/DataStoreListSummary.js index b135326c..36597bd9 100644 --- a/www/datastore/DataStoreListSummary.js +++ b/www/datastore/DataStoreListSummary.js @@ -54,8 +54,8 @@ Ext.define('PBS.datastore.DataStoreListSummary', { let usage = statusData.used/statusData.total; let usagetext = Ext.String.format(gettext('{0} of {1}'), - Proxmox.Utils.format_size(statusData.used), - Proxmox.Utils.format_size(statusData.total), + Proxmox.Utils.format_size(statusData.used, true), + Proxmox.Utils.format_size(statusData.total, true), ); let usagePanel = me.lookup('usage'); diff --git a/www/datastore/Summary.js b/www/datastore/Summary.js index cb220826..bed53844 100644 --- a/www/datastore/Summary.js +++ b/www/datastore/Summary.js @@ -69,7 +69,7 @@ Ext.define('PBS.DataStoreInfo', { let total = store.getById('total').data.value; let used = store.getById('used').data.value; - let usage = PBS.Utils.render_size_usage(used, total); + let usage = Proxmox.Utils.render_size_usage(used, total, true); vm.set('usagetext', usage); vm.set('usage', used/total); diff --git a/www/panel/NodeInfo.js b/www/panel/NodeInfo.js index d990f561..e5c30a40 100644 --- a/www/panel/NodeInfo.js +++ b/www/panel/NodeInfo.js @@ -114,7 +114,7 @@ Ext.define('PBS.NodeInfoPanel', { title: gettext('HD space') + '(root)', valueField: 'root', maxField: 'root', - renderer: Proxmox.Utils.render_node_size_usage, + renderer: ({ used, total }) => Proxmox.Utils.render_size_usage(used, total, true), }, { iconCls: 'pmx-icon-size fa fa-fw fa-refresh',