ui: TaskSummary: add subPanelModal and datastore parameters

in preparation for the per-datastore grid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-11-09 16:01:27 +01:00 committed by Thomas Lamprecht
parent 4623cd6497
commit a3cdb19e33
1 changed files with 17 additions and 1 deletions

View File

@ -27,6 +27,12 @@ Ext.define('PBS.TaskSummary', {
"verify": gettext('Verify'), "verify": gettext('Verify'),
}, },
// set true to show the onclick panel as modal grid
subPanelModal: false,
// the datastore the onclick panel is filtered by
datastore: undefined,
controller: { controller: {
xclass: 'Ext.app.ViewController', xclass: 'Ext.app.ViewController',
@ -49,6 +55,10 @@ Ext.define('PBS.TaskSummary', {
filterParam.since = me.since; filterParam.since = me.since;
} }
if (view.datastore) {
filterParam.store = view.datastore;
}
if (record.data[state] === 0) { if (record.data[state] === 0) {
return; return;
} }
@ -150,7 +160,13 @@ Ext.define('PBS.TaskSummary', {
tasklist.getStore().getProxy().setExtraParams(filterParam); tasklist.getStore().getProxy().setExtraParams(filterParam);
tasklist.getStore().removeAll(); tasklist.getStore().removeAll();
tasklist.showBy(td, 'bl-tl'); if (view.subPanelModal) {
tasklist.modal = true;
tasklist.showBy(Ext.getBody(), 'c-c');
} else {
tasklist.modal = false;
tasklist.showBy(td, 'bl-tl');
}
setTimeout(() => tasklist.getStore().reload(), 10); setTimeout(() => tasklist.getStore().reload(), 10);
} }
}, },