[pbs-devel] [PATCH proxmox-backup 07/10] ui: TaskSummary: add subPanelModal and datastore parameters

Dominik Csapak d.csapak at proxmox.com
Mon Nov 9 16:01:27 CET 2020


in preparation for the per-datastore grid

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 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);
 	    }
 	},
-- 
2.20.1






More information about the pbs-devel mailing list