From 445b0043b201d3d413ce3d6c1ea58f1cde66a9b9 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 10 Nov 2020 12:58:00 +0100 Subject: [PATCH] ui: show (local)datastore column only in global sync/verifyview 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 --- 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(); + } });