public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit] RDD: don't display power-of-two suffix 'i' for values without unit suffix
Date: Mon, 10 Oct 2022 11:55:07 +0200	[thread overview]
Message-ID: <20221010095507.134547-1-m.heiserer@proxmox.com> (raw)

So instead of showing "0 i" (meaning e.g. 0 Gi), just display "0".

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

I couldn't come up with a shorter commit message, feel free to change it.

 src/panel/RRDChart.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/panel/RRDChart.js b/src/panel/RRDChart.js
index 41533ea..263070a 100644
--- a/src/panel/RRDChart.js
+++ b/src/panel/RRDChart.js
@@ -92,7 +92,7 @@ Ext.define('Proxmox.widget.RRDChart', {
 	    value = Ext.util.Format.number(value, format);
 
 	    let unit = units[si];
-	    if (this.powerOfTwo) unit += 'i';
+	    if (unit && this.powerOfTwo) unit += 'i';
 
 	    return `${value.toString()} ${unit}`;
 	},
-- 
2.30.2





             reply	other threads:[~2022-10-10  9:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10  9:55 Matthias Heiserer [this message]
2022-11-16 19:35 ` [pve-devel] applied: " 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=20221010095507.134547-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal