public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: piknew <mparka@wp.pl>
To: pve-devel@lists.proxmox.com
Subject: [PATCH] fix #7551: disk: remove redundant wearout calculation from disk list renderer
Date: Mon, 9 Nov 2026 11:57:54 +0100	[thread overview]
Message-ID: <acbed8f5-257a-47c2-b642-133ce6ea9521@PKPC.local> (raw)

The UI renderer for the wearout column previously assumed that the API
returned a "remaining lifetime" value, unconditionally performing a
'100 - value' calculation. This led to broken and negative values (such
as -153%) on disks that exceeded their nominal TBW or returned raw wearout.

Since the backend is now updated to deliver a normalized, final wearout
("used") percentage across different drive types, this patch removes the
redundant calculation and prints the numeric value directly.

Signed-off-by: piknew <mparka@wp.pl>
---
 src/panel/DiskList.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/panel/DiskList.js b/src/panel/DiskList.js
index 0762bab..cdd9eec 100644
--- a/src/panel/DiskList.js
+++ b/src/panel/DiskList.js
@@ -369,7 +369,7 @@ Ext.define('Proxmox.DiskList', {
             dataIndex: 'wearout',
             renderer: function (value) {
                 if (Ext.isNumeric(value)) {
-                    return (100 - value).toString() + '%';
+                    return value.toString() + '%';
                 }
                 return gettext('N/A');
             },
-- 
2.43.0.windows.1





                 reply	other threads:[~2026-11-09 10:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=acbed8f5-257a-47c2-b642-133ce6ea9521@PKPC.local \
    --to=mparka@wp.pl \
    --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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal