From a3cdb19e3392dd4eaf44b66d38646ffcef560510 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 9 Nov 2020 16:01:27 +0100 Subject: [PATCH] ui: TaskSummary: add subPanelModal and datastore parameters in preparation for the per-datastore grid Signed-off-by: Dominik Csapak --- www/dashboard/TaskSummary.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/www/dashboard/TaskSummary.js b/www/dashboard/TaskSummary.js index c70c4118..e4c5378c 100644 --- a/www/dashboard/TaskSummary.js +++ b/www/dashboard/TaskSummary.js @@ -27,6 +27,12 @@ Ext.define('PBS.TaskSummary', { "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: { xclass: 'Ext.app.ViewController', @@ -49,6 +55,10 @@ Ext.define('PBS.TaskSummary', { filterParam.since = me.since; } + if (view.datastore) { + filterParam.store = view.datastore; + } + if (record.data[state] === 0) { return; } @@ -150,7 +160,13 @@ Ext.define('PBS.TaskSummary', { tasklist.getStore().getProxy().setExtraParams(filterParam); 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); } },