ui: prune & gc: relay activate/deactivate events to sub panels
which allows us also to drop the initial manual load in the init, which would also trigger if the tab isn't visible. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
fbfc439372
commit
17b079918e
|
@ -41,7 +41,6 @@ Ext.define('PBS.config.PruneJobView', {
|
|||
}
|
||||
view.getStore().rstore.getProxy().setExtraParams(params);
|
||||
Proxmox.Utils.monStoreErrors(view, view.getStore().rstore);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
addPruneJob: function() {
|
||||
|
|
|
@ -101,6 +101,7 @@ Ext.define('PBS.Datastore.PruneAndGC', {
|
|||
{
|
||||
xtype: 'pbsDatastoreGCOpts',
|
||||
title: gettext('Garbage Collection'),
|
||||
itemId: 'datastore-gc',
|
||||
nodename: 'localhost',
|
||||
cbind: {
|
||||
datastore: '{datastore}',
|
||||
|
@ -109,6 +110,7 @@ Ext.define('PBS.Datastore.PruneAndGC', {
|
|||
{
|
||||
xtype: 'pbsPruneJobView',
|
||||
nodename: 'localhost',
|
||||
itemId: 'datastore-prune-jobs',
|
||||
flex: 1,
|
||||
minHeight: 200,
|
||||
cbind: {
|
||||
|
@ -116,4 +118,16 @@ Ext.define('PBS.Datastore.PruneAndGC', {
|
|||
},
|
||||
},
|
||||
],
|
||||
initComponent: function() {
|
||||
let me = this;
|
||||
|
||||
let subPanelIds = me.items.map(el => el.itemId);
|
||||
|
||||
me.callParent();
|
||||
|
||||
for (const itemId of subPanelIds) {
|
||||
let component = me.getComponent(itemId);
|
||||
component.relayEvents(me, ['activate', 'deactivate', 'destroy']);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue