[pve-devel] [PATCH v3 widget-toolkit 1/2] ui: SMART: fix eslint error / show correct value

Matthias Heiserer m.heiserer at proxmox.com
Fri Feb 24 15:40:45 CET 2023


Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---

Changes from v2:
Calculate the field in a different way...

Thanks to dominik for simplifying/fixing the logic!

 src/window/DiskSmart.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/window/DiskSmart.js b/src/window/DiskSmart.js
index b538ea1..3824175 100644
--- a/src/window/DiskSmart.js
+++ b/src/window/DiskSmart.js
@@ -159,12 +159,12 @@ 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 ?? data.value,
 	    },
 	    {
 		name: 'real-normalized',
 		// FIXME remove with next major release (PBS 3.0)
-		calculate: data => data.normalized ?? data.raw,
+		calculate: data => data.normalized ?? data.value,
 	    },
 	],
 	idProperty: 'name',
-- 
2.30.2






More information about the pve-devel mailing list