[pve-devel] [PATCH pve-manager 4/5] Fixes Hardware View gridPanel for ExtJS6

Emmanuel Kasper e.kasper at proxmox.com
Thu Mar 17 10:31:11 CET 2016


 * uses Ext.apply() instead of applyIf(), because the parent class
 already set a toolbar to 'null', and we want to override that
 * use 'activate' event to redisplay content on page reload
 * use a managed listener via mon() so we ignore events from the store
 when the component is not displayed ( prevent race conditions)
---
 www/manager6/qemu/HardwareView.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 89f2f4e..aef7e08 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -456,7 +456,7 @@ Ext.define('PVE.qemu.HardwareView', {
 
 	};
 
-	Ext.applyIf(me, {
+	Ext.apply(me, {
 	    url: '/api2/json/' + 'nodes/' + nodename + '/qemu/' + vmid + '/pending',
 	    interval: 5000,
 	    selModel: sm,
@@ -526,11 +526,11 @@ Ext.define('PVE.qemu.HardwareView', {
 
 	me.callParent();
 
-	me.on('show', me.rstore.startUpdate);
+	me.on('activate', me.rstore.startUpdate);
 	me.on('hide', me.rstore.stopUpdate);
 	me.on('destroy', me.rstore.stopUpdate);	
 
-	me.rstore.on('datachanged', function() {
+	me.mon(me.rstore, 'refresh', function() {
 	    set_button_status();
 	});
     }
-- 
2.1.4





More information about the pve-devel mailing list