[pve-devel] [PATCH manager 2/5] gui: lxc/Resources: improve reload behaviour

Dominik Csapak d.csapak at proxmox.com
Thu Oct 31 09:33:41 CET 2019


reload when a new disk was added, and set the button status
on a reload

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/lxc/Resources.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js
index f6358122..1114c051 100644
--- a/www/manager6/lxc/Resources.js
+++ b/www/manager6/lxc/Resources.js
@@ -295,6 +295,7 @@ Ext.define('PVE.lxc.RessourceView', {
 					unprivileged: me.getObjectValue('unprivileged'),
 					pveSelNode: me.pveSelNode
 				    });
+				    win.on('destroy', me.reload, me);
 				    win.show();
 				}
 			    }
@@ -325,6 +326,10 @@ Ext.define('PVE.lxc.RessourceView', {
 	me.on('destroy', me.rstore.stopUpdate);
 	me.on('deactivate', me.rstore.stopUpdate);
 
+	me.mon(me.getStore(), 'datachanged', function() {
+	    set_button_status();
+	});
+
 	Ext.apply(me.editorConfig, { unprivileged: me.getObjectValue('unprivileged') });
     }
 });
-- 
2.20.1





More information about the pve-devel mailing list