[pbs-devel] [PATCH proxmox-backup] ui: show (local)datastore column only in global sync/verifyview

Dominik Csapak d.csapak at proxmox.com
Tue Nov 10 12:58:00 CET 2020


its rather hacky, but our cbind mixin does not support columns (yet).
if it does sometime in the future, we could use that instead

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/config/SyncView.js   |  9 +++++++++
 www/config/VerifyView.js | 14 ++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/www/config/SyncView.js b/www/config/SyncView.js
index 24990ff0..cac812de 100644
--- a/www/config/SyncView.js
+++ b/www/config/SyncView.js
@@ -306,4 +306,13 @@ Ext.define('PBS.config.SyncJobView', {
 	    sortable: true,
 	},
     ],
+
+    initComponent: function() {
+	let me = this;
+	let hideLocalDatastore = !!me.datastore;
+
+	me.columns[3].hidden = hideLocalDatastore;
+
+	me.callParent();
+    },
 });
diff --git a/www/config/VerifyView.js b/www/config/VerifyView.js
index 8a0ed6d4..26164555 100644
--- a/www/config/VerifyView.js
+++ b/www/config/VerifyView.js
@@ -234,6 +234,11 @@ Ext.define('PBS.config.VerifyJobView', {
 	    flex: 1,
 	    sortable: true,
 	},
+	{
+	    header: gettext('Datastore'),
+	    dataIndex: 'store',
+	    flex: 1,
+	},
 	{
 	    header: gettext('Skip Verified'),
 	    dataIndex: 'ignore-verified',
@@ -290,4 +295,13 @@ Ext.define('PBS.config.VerifyJobView', {
 	    sortable: true,
 	},
     ],
+
+    initComponent: function() {
+	let me = this;
+	let hideDatastore = !!me.datastore;
+
+	me.columns[1].hidden = hideDatastore;
+
+	me.callParent();
+    }
 });
-- 
2.20.1






More information about the pbs-devel mailing list