[pve-devel] [PATCH manager v2 07/11] reload the pool grid correctly

Dominik Csapak d.csapak at proxmox.com
Mon Jul 31 15:15:29 CEST 2017


whenever a window is closed (creation, deletion) we want to reload the
pool grid, for not having to wait on the next refresh

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* do not use unnecessary reload function but call rstore.load directly
 www/manager6/ceph/Pool.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js
index bf8cf8a9..fc5f40eb 100644
--- a/www/manager6/ceph/Pool.js
+++ b/www/manager6/ceph/Pool.js
@@ -165,6 +165,9 @@ Ext.define('PVE.node.CephPoolList', {
                     nodename: nodename
 		});
 		win.show();
+		win.on('destroy', function() {
+		    rstore.load();
+		});
 	    }
 	});
 
@@ -181,10 +184,13 @@ Ext.define('PVE.node.CephPoolList', {
 		var base_url = '/nodes/' + nodename + '/ceph/pools/' +
 		    rec.data.pool_name;
 
-		Ext.create('PVE.window.SafeDestroy', {
+		var win = Ext.create('PVE.window.SafeDestroy', {
 		    url: base_url,
 		    item: { type: 'CephPool', id: rec.data.pool_name }
 		}).show();
+		win.on('destroy', function() {
+		    rstore.load();
+		});
 	    }
 	});
 
-- 
2.11.0





More information about the pve-devel mailing list