public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager v6 18/21] ui: lxc: introduce resource volume grid
Date: Thu, 19 Nov 2026 10:28:31 +0100	[thread overview]
Message-ID: <20261119092930.830046-19-d.csapak@proxmox.com> (raw)
In-Reply-To: <20261119092930.830046-1-d.csapak@proxmox.com>

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 <d.csapak@proxmox.com>
---
 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





  parent reply	other threads:[~2026-11-19  9:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  9:28 [PATCH pve-manager v6 00/21] ui: split out disks and nics into grids Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 01/21] ui: utils: factor out 'media=cdrom' check Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 02/21] ui: parser: qemu drive: allow '-' in key name Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 03/21] ui: qemu: network edit: remove unused 'networkmode' property Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 04/21] ui: parser: qemu network: allow unknown keys Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 05/21] ui: factor out the guest key nic regex check Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 06/21] ui: add pending grid Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 07/21] ui: revert button: add parentXType and reloadCallback Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 08/21] ui: button: add config remove button Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 09/21] ui: qemu: hardware: wrap in container Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 10/21] ui: qemu: introduce hardware disk grid Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 11/21] ui: qemu: introduce hardware net grid Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 12/21] ui: qemu: hardware view: separate disks into own grid Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 13/21] ui: qemu: hardware view: separate nics " Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 14/21] ui: qemu: hardware view: inline edit/remove/revert button in general grid Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 15/21] ui: qemu: hardware view: inline 'add efi' menuitem Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 16/21] ui: utils: factor out volume size renderer Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 17/21] ui: lxc: network view: convert to pending grid Dominik Csapak
2026-11-19  9:28 ` Dominik Csapak [this message]
2026-11-19  9:28 ` [PATCH pve-manager v6 19/21] ui: lxc: resources: separate volumes into own grid Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 20/21] ui: lxc: resources: integrate network view Dominik Csapak
2026-11-19  9:28 ` [PATCH pve-manager v6 21/21] ui: qemu/lxc: volume/disk grid: add overflow handler Dominik Csapak

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=20261119092930.830046-19-d.csapak@proxmox.com \
    --to=d.csapak@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal