From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v2 1/2] ui: storage: backup: refactor extraColumns assignment
Date: Tue, 25 Apr 2023 09:21:27 +0200 [thread overview]
Message-ID: <20230425072128.566363-1-d.csapak@proxmox.com> (raw)
makes it easier to add columns, and uses less indentation
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
new in v2
www/manager6/storage/BackupView.js | 40 +++++++++++++++---------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/www/manager6/storage/BackupView.js b/www/manager6/storage/BackupView.js
index fbdf573d3..e0921f4f5 100644
--- a/www/manager6/storage/BackupView.js
+++ b/www/manager6/storage/BackupView.js
@@ -195,28 +195,28 @@ Ext.define('PVE.storage.BackupView', {
pruneButton,
);
+ me.extraColumns = {};
+
if (isPBS) {
- me.extraColumns = {
- encrypted: {
- header: gettext('Encrypted'),
- dataIndex: 'encrypted',
- renderer: PVE.Utils.render_backup_encryption,
- sorter: {
- property: 'encrypted',
- transform: encrypted => encrypted ? 1 : 0,
- },
+ me.extraColumns.encrypted = {
+ header: gettext('Encrypted'),
+ dataIndex: 'encrypted',
+ renderer: PVE.Utils.render_backup_encryption,
+ sorter: {
+ property: 'encrypted',
+ transform: encrypted => encrypted ? 1 : 0,
},
- verification: {
- header: gettext('Verify State'),
- dataIndex: 'verification',
- renderer: PVE.Utils.render_backup_verification,
- sorter: {
- property: 'verification',
- transform: value => {
- let state = value?.state ?? 'none';
- let order = PVE.Utils.verificationStateOrder;
- return order[state] ?? order.__default__;
- },
+ };
+ me.extraColumns.verification = {
+ header: gettext('Verify State'),
+ dataIndex: 'verification',
+ renderer: PVE.Utils.render_backup_verification,
+ sorter: {
+ property: 'verification',
+ transform: value => {
+ let state = value?.state ?? 'none';
+ let order = PVE.Utils.verificationStateOrder;
+ return order[state] ?? order.__default__;
},
},
};
--
2.30.2
next reply other threads:[~2023-04-25 7:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 7:21 Dominik Csapak [this message]
2023-04-25 7:21 ` [pve-devel] [PATCH manager v2 2/2] fix #4678: ui: don't sort storage backup content by vmid by default Dominik Csapak
2023-06-06 17:23 ` [pve-devel] applied-series: [PATCH manager v2 1/2] ui: storage: backup: refactor extraColumns assignment Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230425072128.566363-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal