ext6migrate: change status units to binary prefixes

we used a factor of 2^10 when calculating, but
wrote MB,GB,etc which is not (entirely) correct

this patch changes the units to MiB, GiB, etc,
because this is more sensible than changing the calculation

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2016-03-31 10:30:19 +02:00 committed by Dietmar Maurer
parent b549494539
commit 7b9c038d54

View File

@ -624,24 +624,24 @@ Ext.define('PVE.Utils', { statics: {
var kb = size / 1024;
if (kb < 1024) {
return kb.toFixed(0) + "KB";
return kb.toFixed(0) + "KiB";
}
var mb = size / (1024*1024);
if (mb < 1024) {
return mb.toFixed(0) + "MB";
return mb.toFixed(0) + "MiB";
}
var gb = mb / 1024;
if (gb < 1024) {
return gb.toFixed(2) + "GB";
return gb.toFixed(2) + "GiB";
}
var tb = gb / 1024;
return tb.toFixed(2) + "TB";
return tb.toFixed(2) + "TiB";
},