From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 widget-toolkit] ui: SMART: fix eslint error and show correct value
Date: Fri, 24 Feb 2023 13:10:07 +0100 [thread overview]
Message-ID: <20230224121007.186614-1-m.heiserer@proxmox.com> (raw)
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
---
Sorry for the long delay and the overall confusion!
This is the v2 of https://lists.proxmox.com/pipermail/pve-devel/2023-February/055798.html
The second arrow function spans multiple lines, that's because it really does not fit on a single one
and previous attempts to reduce the size didn't work out.
src/window/DiskSmart.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/window/DiskSmart.js b/src/window/DiskSmart.js
index b538ea1..af2a023 100644
--- a/src/window/DiskSmart.js
+++ b/src/window/DiskSmart.js
@@ -159,12 +159,17 @@ Ext.define('Proxmox.window.DiskSmart', {
{
name: 'real-value',
// FIXME remove with next major release (PBS 3.0)
- calculate: data => (data.normalized ?? false) ? data.raw : data.value,
+ calculate: data => data.raw,
},
{
name: 'real-normalized',
// FIXME remove with next major release (PBS 3.0)
- calculate: data => data.normalized ?? data.raw,
+ calculate: data => {
+ if (data.normalized === undefined || data.raw === undefined) {
+ return data.value;
+ }
+ return data.normalized;
+ },
},
],
idProperty: 'name',
--
2.30.2
next reply other threads:[~2023-02-24 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 12:10 Matthias Heiserer [this message]
2023-02-24 13:25 ` Dominik Csapak
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=20230224121007.186614-1-m.heiserer@proxmox.com \
--to=m.heiserer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox