From: Christian Ebner <c.ebner@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-manager] ui: node summary: use SI units for HD usage
Date: Tue, 21 Nov 2023 12:03:17 +0100 (CET) [thread overview]
Message-ID: <1925251120.455.1700564597724@webmail.proxmox.com> (raw)
In-Reply-To: <5b15cdca-9203-469a-8a6f-8922db178302@proxmox.com>
> On 21.11.2023 11:05 CET Fiona Ebner <f.ebner@proxmox.com> wrote:
>
>
> Am 21.11.23 um 10:00 schrieb Christian Ebner:
> > diff --git a/www/manager6/node/StatusView.js b/www/manager6/node/StatusView.js
> > index d34724f7..a6975b6e 100644
> > --- a/www/manager6/node/StatusView.js
> > +++ b/www/manager6/node/StatusView.js
> > @@ -72,7 +72,9 @@ Ext.define('PVE.node.StatusView', {
> > title: '/ ' + gettext('HD space'),
> > valueField: 'rootfs',
> > maxField: 'rootfs',
> > - renderer: Proxmox.Utils.render_node_size_usage,
> > + renderer: function(record) {
> > + return Proxmox.Utils.render_size_usage(record.used, record.total, true);
> > + },
>
> Would it make more sense to change render_node_size_usage directly? Then
> PMG and PBS would also get the change. Like this, it will be
> inconsistent between the products, or?
render_node_size_usage is used also for rendering memory size information, where we want IEC units.
Therefore, my initial approach was adding the `useSI` parameter to `render_node_size_usage` as second parameter, which however breaks all the other renderer invocations, I assume because the renderer invocation passes along multiple parameters.
This is why I opted for the invocation as is.
PBS already shows the HD usage values in SI units.
Cheers,
Chris
next prev parent reply other threads:[~2023-11-21 11:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 9:00 Christian Ebner
2023-11-21 9:58 ` Philipp Hufnagl
2023-11-21 10:05 ` Fiona Ebner
2023-11-21 11:03 ` Christian Ebner [this message]
2023-11-21 11:10 ` Christian Ebner
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=1925251120.455.1700564597724@webmail.proxmox.com \
--to=c.ebner@proxmox.com \
--cc=f.ebner@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.