From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Noel Ullreich <n.ullreich@proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-manager 0/2] ui: fix #3760: change units of ram/swap
Date: Fri, 7 Jul 2023 14:29:47 +0200 [thread overview]
Message-ID: <bbb400a9-71b3-7220-a5b4-f7bdf84b1422@proxmox.com> (raw)
In-Reply-To: <20230616095410.33426-1-n.ullreich@proxmox.com>
Am 16.06.23 um 11:54 schrieb Noel Ullreich:
> Up until now, ram, balloonsize and swap were set in MiB, meaning if you wanted to
> create or change a VMs/CTs memory, you would first have to do the math to
> convert from GiB to MiB.
> This patch adds a dropdown-menu of units, MiB, GiB, and TiB, (although
> PiB could easily be added in the future) for ram and swap.
> A future patch in line with this could add units in the API, allowing for
> improved usability from the commandline (e.g. `qm create <id> --memory 2GiB`).
>
> having `scalingFactor` list in MemoryEdit and Resource Edits might not
> be the most elegant solution, the other option was sticking them in
> `proxmox-widget-toolkit/src/Utils.js` or using the units from there.
> However, if we want to use the units from there, we need to scale them
> and trim the unneeded units. So I thought the least invasive solution
> was to put the `scalingFactor` right in the Files.
>
Haven't looked at the details, but we already have
Proxmox.form.SizeField (in widget-toolkit's
src/form/BandwidthSelector.js) with a comment
// display unit (TODO: make (optionally) selectable)
unit: 'MiB',
Maybe you can implement the change there and then simply re-use that
component here to avoid some duplication?
prev parent reply other threads:[~2023-07-07 12:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 9:54 Noel Ullreich
2023-06-16 9:54 ` [pve-devel] [PATCH pve-manager 1/2] ui: fix #3760: change unit of memory of a VM Noel Ullreich
2023-06-16 9:54 ` [pve-devel] [PATCH pve-manager 2/2] ui: fix: change units of memory/swap for containers Noel Ullreich
2023-07-03 12:08 ` [pve-devel] [PATCH pve-manager 0/2] ui: fix #3760: change units of ram/swap Noel Ullreich
2023-07-07 12:29 ` Fiona Ebner [this message]
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=bbb400a9-71b3-7220-a5b4-f7bdf84b1422@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=n.ullreich@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