From ed216fd773bb90178b307ab1464630df619eafc7 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 26 May 2020 18:58:19 +0200 Subject: [PATCH] ui: acl view: only update if component is activated Avoid triggering non-required background updates during browsing a datastores content or statistics panels. They're not expensive, but I do not like such behavior at all (having traveled with trains and spotty network to often) Signed-off-by: Thomas Lamprecht --- www/config/ACLView.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/www/config/ACLView.js b/www/config/ACLView.js index 0e9004c8..86797c91 100644 --- a/www/config/ACLView.js +++ b/www/config/ACLView.js @@ -79,6 +79,16 @@ Ext.define('PBS.config.ACLView', { proxy.setExtraParams(params); Proxmox.Utils.monStoreErrors(view, view.getStore().rstore); }, + control: { + '#': { // view + activate: function() { + this.getView().getStore().rstore.startUpdate(); + }, + deactivate: function() { + this.getView().getStore().rstore.stopUpdate(); + }, + }, + }, }, store: { @@ -90,7 +100,6 @@ Ext.define('PBS.config.ACLView', { type: 'update', storeid: 'pmx-acls', model: 'pmx-acls', - autoStart: true, interval: 5000, }, },