From: Timo Meschkat <timo.meschkat@datenzelt.de>
To: pve-devel@lists.proxmox.com
Subject: [RFC PATCH manager 3/4] ui: disk storage selector: allow selecting the size unit
Date: Mon, 26 Oct 2026 23:04:22 +0100 [thread overview]
Message-ID: <20261026220423.127776-7-timo.meschkat@datenzelt.de> (raw)
In-Reply-To: <20261026220423.127776-1-timo.meschkat@datenzelt.de>
The size of new VM disks and container volumes could only be entered
in GiB so far, so small disks needed fractions and large ones a
conversion. GiB stays the default and is still what gets sent to the
API.
The minimum is now 1 MiB instead of 0.001 GiB, so that it is a round
value in the smallest selectable unit.
Signed-off-by: Timo Meschkat <timo.meschkat@datenzelt.de>
---
www/manager6/form/DiskStorageSelector.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/www/manager6/form/DiskStorageSelector.js b/www/manager6/form/DiskStorageSelector.js
index 696f9033..df94c938 100644
--- a/www/manager6/form/DiskStorageSelector.js
+++ b/www/manager6/form/DiskStorageSelector.js
@@ -157,13 +157,17 @@ Ext.define('PVE.form.DiskStorageSelector', {
hidden: true,
},
{
- xtype: 'numberfield',
+ xtype: 'pmxSizeUnitField',
itemId: 'disksize',
name: 'disksize',
- fieldLabel: `${gettext('Disk size')} (${gettext('GiB')})`,
+ fieldLabel: gettext('Disk size'),
+ fieldDescription: gettext('Capacity of the disk'),
hidden: me.hideSize,
disabled: me.hideSize,
- minValue: 0.001,
+ backendUnit: 'GiB',
+ unit: 'GiB',
+ allowFractionalValue: true,
+ minValue: 1 / 1024,
maxValue: 128 * 1024,
decimalPrecision: 3,
value: me.defaultSize,
--
2.47.3
next prev parent reply other threads:[~2026-10-26 22:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 22:04 [RFC PATCH widget-toolkit/manager 0/7] ui: allow selecting the unit for memory and disk sizes Timo Meschkat
2026-10-26 22:04 ` [RFC PATCH widget-toolkit 1/3] form: add size field with selectable unit Timo Meschkat
2026-10-26 22:04 ` [RFC PATCH widget-toolkit 2/3] form: size field: accept a unit suffix like 8G Timo Meschkat
2026-10-26 22:04 ` [RFC PATCH widget-toolkit 3/3] form: size field: add optional field description Timo Meschkat
2026-10-26 22:04 ` [RFC PATCH manager 1/4] fix #3760: ui: qemu: allow selecting the memory unit Timo Meschkat
2026-10-26 22:04 ` [RFC PATCH manager 2/4] ui: lxc: allow selecting the unit for memory and swap Timo Meschkat
2026-10-26 22:04 ` Timo Meschkat [this message]
2026-10-26 22:04 ` [RFC PATCH manager 4/4] ui: disk resize: allow selecting the size unit Timo Meschkat
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=20261026220423.127776-7-timo.meschkat@datenzelt.de \
--to=timo.meschkat@datenzelt.de \
--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