ui: storage: backup: refactor extraColumns assignment

makes it easier to add columns, and uses less indentation

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2023-04-25 09:21:27 +02:00 committed by Thomas Lamprecht
parent 9a023d5540
commit 73ea065ac2

View File

@ -195,9 +195,10 @@ Ext.define('PVE.storage.BackupView', {
pruneButton,
);
me.extraColumns = {};
if (isPBS) {
me.extraColumns = {
encrypted: {
me.extraColumns.encrypted = {
header: gettext('Encrypted'),
dataIndex: 'encrypted',
renderer: PVE.Utils.render_backup_encryption,
@ -205,8 +206,8 @@ Ext.define('PVE.storage.BackupView', {
property: 'encrypted',
transform: encrypted => encrypted ? 1 : 0,
},
},
verification: {
};
me.extraColumns.verification = {
header: gettext('Verify State'),
dataIndex: 'verification',
renderer: PVE.Utils.render_backup_verification,
@ -218,7 +219,6 @@ Ext.define('PVE.storage.BackupView', {
return order[state] ?? order.__default__;
},
},
},
};
}