public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Timo Meschkat <timo.meschkat@datenzelt.de>
To: pve-devel@lists.proxmox.com
Subject: [RFC PATCH manager 2/4] ui: lxc: allow selecting the unit for memory and swap
Date: Mon, 26 Oct 2026 23:04:21 +0100	[thread overview]
Message-ID: <20261026220423.127776-6-timo.meschkat@datenzelt.de> (raw)
In-Reply-To: <20261026220423.127776-1-timo.meschkat@datenzelt.de>

Like for VMs, memory and swap of containers could only be entered in
MiB so far. MiB stays the default.

Signed-off-by: Timo Meschkat <timo.meschkat@datenzelt.de>
---
 www/manager6/lxc/ResourceEdit.js | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js
index 5951e122..c0c1a64f 100644
--- a/www/manager6/lxc/ResourceEdit.js
+++ b/www/manager6/lxc/ResourceEdit.js
@@ -134,22 +134,26 @@ Ext.define('PVE.lxc.MemoryInputPanel', {
 
         var items = [
             {
-                xtype: 'proxmoxintegerfield',
+                xtype: 'pmxSizeUnitField',
                 name: 'memory',
+                backendUnit: 'MiB',
+                unitSteps: { MiB: 32 },
                 minValue: 16,
                 value: '512',
-                step: 32,
-                fieldLabel: gettext('Memory') + ' (MiB)',
+                fieldLabel: gettext('Memory'),
+                fieldDescription: gettext('Amount of memory (RAM) of the container'),
                 labelWidth: labelWidth,
                 allowBlank: false,
             },
             {
-                xtype: 'proxmoxintegerfield',
+                xtype: 'pmxSizeUnitField',
                 name: 'swap',
+                backendUnit: 'MiB',
+                unitSteps: { MiB: 32 },
                 minValue: 0,
                 value: '512',
-                step: 32,
-                fieldLabel: gettext('Swap') + ' (MiB)',
+                fieldLabel: gettext('Swap'),
+                fieldDescription: gettext('Amount of swap space of the container'),
                 labelWidth: labelWidth,
                 allowBlank: false,
             },
-- 
2.47.3




  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 ` Timo Meschkat [this message]
2026-10-26 22:04 ` [RFC PATCH manager 3/4] ui: disk storage selector: allow selecting the size unit Timo Meschkat
2026-10-26 22:04 ` [RFC PATCH manager 4/4] ui: disk resize: " 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-6-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal