From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id D04FE1FF0BC for ; Mon, 16 Nov 2026 17:33:42 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 09D93218B6; Mon, 16 Nov 2026 17:31:50 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v5 16/18] ui: lxc: introduce resource volume grid Date: Mon, 16 Nov 2026 17:30:41 +0100 Message-ID: <20261116163138.343821-17-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261116163138.343821-1-d.csapak@proxmox.com> References: <20261116163138.343821-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.296 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 2URNVT5SWEKMARRBPO6ZTEJUUOO2GB3D X-Message-ID-Hash: 2URNVT5SWEKMARRBPO6ZTEJUUOO2GB3D X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: intended to be used inside the resource view. not used yet. Shows the rootfs, the mount points and the unused disks with their options split out into columns, like the hardware disk grid for qemu. Same as there, the toolbar buttons will be added directly in the resource view since they require accessing some data from there. Signed-off-by: Dominik Csapak --- www/manager6/Makefile | 1 + www/manager6/lxc/ResourceVolumeGrid.js | 96 ++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 www/manager6/lxc/ResourceVolumeGrid.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile index d14256f9..02e3a8e5 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -223,6 +223,7 @@ JSSRC= \ lxc/Network.js \ lxc/Options.js \ lxc/ResourceEdit.js \ + lxc/ResourceVolumeGrid.js \ lxc/Resources.js \ lxc/MultiMPEdit.js \ menu/MenuItem.js \ diff --git a/www/manager6/lxc/ResourceVolumeGrid.js b/www/manager6/lxc/ResourceVolumeGrid.js new file mode 100644 index 00000000..56a9a4e5 --- /dev/null +++ b/www/manager6/lxc/ResourceVolumeGrid.js @@ -0,0 +1,96 @@ +Ext.define('PVE.lxc.ResourceVolumeGrid', { + extend: 'PVE.grid.PendingGrid', + alias: 'widget.pveLxcResourceVolumeGrid', + + title: gettext('Mount Points'), + + stateful: true, + stateId: 'pve-lxc-resource-volume', + + border: false, + expandable: false, + + minHeight: 100, + + recordParser: (_key, value) => PVE.Parser.parseLxcMountPoint(value), + // override to render the keys properly + renderKey: Ext.htmlEncode, + + columns: [ + { + header: 'ID', + dataIndex: 'id', + width: 170, + renderer: 'renderKey', + }, + { + header: gettext('Volume'), + dataIndex: 'file', + flex: 1, + minWidth: 200, + }, + { + header: gettext('Path'), + dataIndex: 'mp', + flex: 1, + minWidth: 150, + renderer: (v, _md, rec) => (rec.data.key === 'rootfs' ? '/' : Ext.htmlEncode(v)), + }, + { + header: gettext('Size'), + dataIndex: 'size', + width: 100, + renderer: PVE.Utils.renderConfigVolumeSize, + }, + { + header: gettext('ACLs'), + dataIndex: 'acl', + width: 80, + renderer: (v) => + v === undefined ? Proxmox.Utils.defaultText : PVE.Utils.renderBooleanProperty(v), + }, + { + header: gettext('Backup'), + dataIndex: 'backup', + width: 80, + // rootfs is always included in backups + renderer: (v, _md, rec) => + PVE.Utils.renderBooleanProperty(rec.data.key === 'rootfs' ? true : v), + }, + { + header: gettext('Quota'), + dataIndex: 'quota', + width: 80, + renderer: PVE.Utils.renderBooleanProperty, + }, + { + header: gettext('Read-Only'), + dataIndex: 'ro', + width: 100, + renderer: PVE.Utils.renderBooleanProperty, + }, + { + header: gettext('Replicate'), + dataIndex: 'replicate', + width: 100, + renderer: (v) => PVE.Utils.renderBooleanProperty(v ?? true), + }, + { + header: gettext('Mount options'), + dataIndex: 'mountoptions', + width: 150, + }, + { + header: gettext('Shared'), + dataIndex: 'shared', + hidden: true, + renderer: PVE.Utils.renderBooleanProperty, + }, + { + header: gettext('Raw Config'), + dataIndex: 'raw', + hidden: true, + flex: 1, + }, + ], +}); -- 2.47.3