all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-manager 0/2] change unit of memory for ct/vm
@ 2023-07-27 10:30 Noel Ullreich
  2023-07-27 10:30 ` [pve-devel] [PATCH pve-manager 1/2] ui: fix #3760: change unit of memory of a VM Noel Ullreich
  2023-07-27 10:30 ` [pve-devel] [PATCH pve-manager 2/2] ui: fix: change units of memory/swap for containers Noel Ullreich
  0 siblings, 2 replies; 4+ messages in thread
From: Noel Ullreich @ 2023-07-27 10:30 UTC (permalink / raw)
  To: pve-devel

WORK IN PROGRESS! Today is my last day and I wanted to send what I have.

This patch utilizes the changes in `BandwidthSelector.js`
(see https://lists.proxmox.com/pipermail/pve-devel/2023-July/058538.html)
to streamline the implementation of a unit-changing widget.

Noel Ullreich (2):
  ui: fix #3760: change unit of memory of a VM
  ui: fix: change units of memory/swap for containers

 www/manager6/lxc/ResourceEdit.js | 59 ++++++++++++++-------
 www/manager6/qemu/MemoryEdit.js  | 91 +++++++++++++-------------------
 2 files changed, 77 insertions(+), 73 deletions(-)

-- 
2.39.2





^ permalink raw reply	[flat|nested] 4+ messages in thread
* [pve-devel] [PATCH pve-manager 0/2] ui: fix #3760: change units of ram/swap
@ 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
  0 siblings, 1 reply; 4+ messages in thread
From: Noel Ullreich @ 2023-06-16  9:54 UTC (permalink / raw)
  To: pve-devel

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.

Noel Ullreich (2):
  ui: fix #3760: change unit of memory of a VM
  ui: fix: change units of memory/swap for containers

 www/manager6/lxc/ResourceEdit.js | 136 ++++++++++++++++---
 www/manager6/qemu/MemoryEdit.js  | 221 +++++++++++++++++++++++--------
 2 files changed, 285 insertions(+), 72 deletions(-)

-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-27 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-27 10:30 [pve-devel] [PATCH pve-manager 0/2] change unit of memory for ct/vm Noel Ullreich
2023-07-27 10:30 ` [pve-devel] [PATCH pve-manager 1/2] ui: fix #3760: change unit of memory of a VM Noel Ullreich
2023-07-27 10:30 ` [pve-devel] [PATCH pve-manager 2/2] ui: fix: change units of memory/swap for containers Noel Ullreich
  -- strict thread matches above, loose matches on Subject: below --
2023-06-16  9:54 [pve-devel] [PATCH pve-manager 0/2] ui: fix #3760: change units of ram/swap 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

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal