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 <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-05-26 18:58:19 +02:00
parent 0f13623443
commit ed216fd773

View File

@ -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,
},
},