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 <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-17 10:20:05 +02:00
parent f61d822efa
commit 8af1fa5477
4 changed files with 7 additions and 7 deletions

View File

@ -81,21 +81,21 @@ Ext.define('PBS.DatastoreStatistics', {
dataIndex: 'total', dataIndex: 'total',
sortable: true, sortable: true,
width: 90, 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'), text: gettext('Used'),
dataIndex: 'used', dataIndex: 'used',
sortable: true, sortable: true,
width: 90, 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'), text: gettext('Available'),
dataIndex: 'avail', dataIndex: 'avail',
sortable: true, sortable: true,
width: 90, 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 %'), text: gettext('Usage %'),

View File

@ -54,8 +54,8 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
let usage = statusData.used/statusData.total; let usage = statusData.used/statusData.total;
let usagetext = Ext.String.format(gettext('{0} of {1}'), let usagetext = Ext.String.format(gettext('{0} of {1}'),
Proxmox.Utils.format_size(statusData.used), Proxmox.Utils.format_size(statusData.used, true),
Proxmox.Utils.format_size(statusData.total), Proxmox.Utils.format_size(statusData.total, true),
); );
let usagePanel = me.lookup('usage'); let usagePanel = me.lookup('usage');

View File

@ -69,7 +69,7 @@ Ext.define('PBS.DataStoreInfo', {
let total = store.getById('total').data.value; let total = store.getById('total').data.value;
let used = store.getById('used').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('usagetext', usage);
vm.set('usage', used/total); vm.set('usage', used/total);

View File

@ -114,7 +114,7 @@ Ext.define('PBS.NodeInfoPanel', {
title: gettext('HD space') + '(root)', title: gettext('HD space') + '(root)',
valueField: 'root', valueField: 'root',
maxField: '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', iconCls: 'pmx-icon-size fa fa-fw fa-refresh',