From b57619ea296632dcc4356b2dbeeec1e4c460f115 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 10 Nov 2020 13:18:01 +0100 Subject: [PATCH] ui: datastores sync: future proof and move local store column in front Signed-off-by: Thomas Lamprecht --- www/config/SyncView.js | 19 ++++++++++++------- www/config/VerifyView.js | 9 +++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/www/config/SyncView.js b/www/config/SyncView.js index cac812de..1decd74d 100644 --- a/www/config/SyncView.js +++ b/www/config/SyncView.js @@ -239,6 +239,12 @@ Ext.define('PBS.config.SyncJobView', { flex: 1, sortable: true, }, + { + header: gettext('Local Store'), + dataIndex: 'store', + width: 120, + sortable: true, + }, { header: gettext('Remote'), dataIndex: 'remote', @@ -251,12 +257,6 @@ Ext.define('PBS.config.SyncJobView', { width: 120, sortable: true, }, - { - header: gettext('Local Store'), - dataIndex: 'store', - width: 120, - sortable: true, - }, { header: gettext('Owner'), dataIndex: 'owner', @@ -311,7 +311,12 @@ Ext.define('PBS.config.SyncJobView', { let me = this; let hideLocalDatastore = !!me.datastore; - me.columns[3].hidden = hideLocalDatastore; + for (let column of me.columns) { + if (column.dataIndex === 'store') { + column.hidden = hideLocalDatastore; + break; + } + } me.callParent(); }, diff --git a/www/config/VerifyView.js b/www/config/VerifyView.js index 26164555..ae494676 100644 --- a/www/config/VerifyView.js +++ b/www/config/VerifyView.js @@ -300,8 +300,13 @@ Ext.define('PBS.config.VerifyJobView', { let me = this; let hideDatastore = !!me.datastore; - me.columns[1].hidden = hideDatastore; + for (let column of me.columns) { + if (column.dataIndex === 'store') { + column.hidden = hideDatastore; + break; + } + } me.callParent(); - } + }, });