ui: datastores sync: future proof and move local store column in front

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-10 13:18:01 +01:00
parent 445b0043b2
commit b57619ea29
2 changed files with 19 additions and 9 deletions

View File

@ -239,6 +239,12 @@ Ext.define('PBS.config.SyncJobView', {
flex: 1, flex: 1,
sortable: true, sortable: true,
}, },
{
header: gettext('Local Store'),
dataIndex: 'store',
width: 120,
sortable: true,
},
{ {
header: gettext('Remote'), header: gettext('Remote'),
dataIndex: 'remote', dataIndex: 'remote',
@ -251,12 +257,6 @@ Ext.define('PBS.config.SyncJobView', {
width: 120, width: 120,
sortable: true, sortable: true,
}, },
{
header: gettext('Local Store'),
dataIndex: 'store',
width: 120,
sortable: true,
},
{ {
header: gettext('Owner'), header: gettext('Owner'),
dataIndex: 'owner', dataIndex: 'owner',
@ -311,7 +311,12 @@ Ext.define('PBS.config.SyncJobView', {
let me = this; let me = this;
let hideLocalDatastore = !!me.datastore; 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(); me.callParent();
}, },

View File

@ -300,8 +300,13 @@ Ext.define('PBS.config.VerifyJobView', {
let me = this; let me = this;
let hideDatastore = !!me.datastore; 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(); me.callParent();
} },
}); });