[pve-devel] [PATCH=Stable-3] Bugfix 682: change at the Gui the used disk size.

Wolfgang Link w.link at proxmox.com
Mon Aug 17 09:03:19 CEST 2015


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                      |    5 +----
 www/manager/storage/StatusView.js |    7 +------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/bin/pvestatd b/bin/pvestatd
index 0510915..ab8ef3d 100755
--- a/bin/pvestatd
+++ b/bin/pvestatd
@@ -253,10 +253,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);
diff --git a/www/manager/storage/StatusView.js b/www/manager/storage/StatusView.js
index 2ac4b9e..3e03f04 100644
--- a/www/manager/storage/StatusView.js
+++ b/www/manager/storage/StatusView.js
@@ -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'), 
-- 
1.7.10.4





More information about the pve-devel mailing list