mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 13:36:37 +00:00
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:
parent
9a023d5540
commit
73ea065ac2
@ -195,28 +195,28 @@ Ext.define('PVE.storage.BackupView', {
|
|||||||
pruneButton,
|
pruneButton,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
me.extraColumns = {};
|
||||||
|
|
||||||
if (isPBS) {
|
if (isPBS) {
|
||||||
me.extraColumns = {
|
me.extraColumns.encrypted = {
|
||||||
encrypted: {
|
header: gettext('Encrypted'),
|
||||||
header: gettext('Encrypted'),
|
dataIndex: 'encrypted',
|
||||||
dataIndex: 'encrypted',
|
renderer: PVE.Utils.render_backup_encryption,
|
||||||
renderer: PVE.Utils.render_backup_encryption,
|
sorter: {
|
||||||
sorter: {
|
property: 'encrypted',
|
||||||
property: 'encrypted',
|
transform: encrypted => encrypted ? 1 : 0,
|
||||||
transform: encrypted => encrypted ? 1 : 0,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
verification: {
|
};
|
||||||
header: gettext('Verify State'),
|
me.extraColumns.verification = {
|
||||||
dataIndex: 'verification',
|
header: gettext('Verify State'),
|
||||||
renderer: PVE.Utils.render_backup_verification,
|
dataIndex: 'verification',
|
||||||
sorter: {
|
renderer: PVE.Utils.render_backup_verification,
|
||||||
property: 'verification',
|
sorter: {
|
||||||
transform: value => {
|
property: 'verification',
|
||||||
let state = value?.state ?? 'none';
|
transform: value => {
|
||||||
let order = PVE.Utils.verificationStateOrder;
|
let state = value?.state ?? 'none';
|
||||||
return order[state] ?? order.__default__;
|
let order = PVE.Utils.verificationStateOrder;
|
||||||
},
|
return order[state] ?? order.__default__;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user