]> git.proxmox.com Git - pve-manager.git/commitdiff
fix bug #682: change at the Gui the used disk size.
authorWolfgang Link <w.link@proxmox.com>
Mon, 17 Aug 2015 07:03:18 +0000 (09:03 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 17 Aug 2015 07:47:36 +0000 (09:47 +0200)
in the pvesm and pvesh we are giving the correct size of the used space from a disk.
this change make the output of Gui and CLI consistent.

bin/pvestatd
www/manager/storage/StatusView.js

index ad688a03bfe318b9623d8318f7388c754c506f15..8c6e63a3cc763873ca9990bf40ec2a1d48340fbd 100755 (executable)
@@ -273,10 +273,7 @@ sub update_storage_status {
        my $d = $info->{$storeid};
        next if !$d->{active};
 
-       # everything not free is considered to be used
-       my $realused = $d->{total} - $d->{avail};
-
-       my $data = "$ctime:$d->{total}:$realused";
+       my $data = "$ctime:$d->{total}:$d->{used}";
 
        my $key = "pve2-storage/${nodename}/$storeid";
        PVE::Cluster::broadcast_rrd($key, $data);
index 2ac4b9ed23044405214cb7bea99d676070f8a598..3e03f0424fc73eba3b1a68f847cedad6cf1a2db7 100644 (file)
@@ -49,12 +49,7 @@ Ext.define('PVE.storage.StatusView', {
            used: {
                header: gettext('Used'), 
                required: true, 
-               renderer: function(value) {
-                   // do not confuse users with filesystem details
-                   var total = me.getObjectValue('total', 0);
-                   var avail = me.getObjectValue('avail', 0);
-                   return PVE.Utils.render_size(total - avail);
-               }
+               renderer: PVE.Utils.render_size
            },
            avail: {
                header: gettext('Avail'),