public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager v4 0/3] ui: add container mount point idmapping
@ 2026-05-13  9:28 Filip Schauer
  2026-05-13  9:28 ` [PATCH manager v4 1/3] ui: lxc/MPEdit: remove duplicate "mp" assignment Filip Schauer
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Filip Schauer @ 2026-05-13  9:28 UTC (permalink / raw)
  To: pve-devel

Integrate UID/GID mapping for container mount points into the web UI.

Changes since v3:
* Do not clear the list when toggling the passthrough checkbox.
* Add a "Clear" button next to "Add".

Changes since v2:
* Replace segmented None/Passthrough/Custom button
  with passthrough checkbox
* Replace segmented UID/GID button with combobox
* Factor the idmap grid out into its own component

Filip Schauer (3):
  ui: lxc/MPEdit: remove duplicate "mp" assignment
  d/control: bump versiond dependency for pve-container
  ui: lxc/MPEdit: add "idmap" option

 debian/control                 |   2 +-
 www/manager6/Makefile          |   1 +
 www/manager6/lxc/IdMapField.js | 216 +++++++++++++++++++++++++++++++++
 www/manager6/lxc/MPEdit.js     |   9 +-
 4 files changed, 226 insertions(+), 2 deletions(-)
 create mode 100644 www/manager6/lxc/IdMapField.js

-- 
2.47.3





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

* [PATCH manager v4 1/3] ui: lxc/MPEdit: remove duplicate "mp" assignment
  2026-05-13  9:28 [PATCH manager v4 0/3] ui: add container mount point idmapping Filip Schauer
@ 2026-05-13  9:28 ` Filip Schauer
  2026-05-13  9:28 ` [PATCH manager v4 2/3] d/control: bump versioned dependency for pve-container Filip Schauer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Filip Schauer @ 2026-05-13  9:28 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
Unchanged since v2

 www/manager6/lxc/MPEdit.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/www/manager6/lxc/MPEdit.js b/www/manager6/lxc/MPEdit.js
index 4ed2d07b..b1f67741 100644
--- a/www/manager6/lxc/MPEdit.js
+++ b/www/manager6/lxc/MPEdit.js
@@ -41,7 +41,6 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
         setMPOpt('mp', values.mp);
         let mountOpts = (values.mountoptions || []).join(';');
         setMPOpt('mountoptions', values.mountoptions, mountOpts);
-        setMPOpt('mp', values.mp);
         setMPOpt('backup', values.backup);
         setMPOpt('quota', values.quota);
         setMPOpt('ro', values.ro);
-- 
2.47.3





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

* [PATCH manager v4 2/3] d/control: bump versioned dependency for pve-container
  2026-05-13  9:28 [PATCH manager v4 0/3] ui: add container mount point idmapping Filip Schauer
  2026-05-13  9:28 ` [PATCH manager v4 1/3] ui: lxc/MPEdit: remove duplicate "mp" assignment Filip Schauer
@ 2026-05-13  9:28 ` Filip Schauer
  2026-05-13  9:28 ` [PATCH manager v4 3/3] ui: lxc/MPEdit: add "idmap" option Filip Schauer
  2026-05-15  5:04 ` applied: [PATCH manager v4 0/3] ui: add container mount point idmapping Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Filip Schauer @ 2026-05-13  9:28 UTC (permalink / raw)
  To: pve-devel

This is needed for UI integration of container mount point id mapping.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
Unchanged since v3

 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 5a6aec2a..447fbec8 100644
--- a/debian/control
+++ b/debian/control
@@ -86,7 +86,7 @@ Depends: apt (>= 1.5~),
          proxmox-termproxy (>= 2.1.0~),
          proxmox-widget-toolkit (>= 5.1.1),
          pve-cluster (>= 9.0.1),
-         pve-container (>= 5.2.5),
+         pve-container (>= 6.1.6),
          pve-docs (>= 9.0.5),
          pve-firewall,
          pve-ha-manager (>= 5.0.3),
-- 
2.47.3





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

* [PATCH manager v4 3/3] ui: lxc/MPEdit: add "idmap" option
  2026-05-13  9:28 [PATCH manager v4 0/3] ui: add container mount point idmapping Filip Schauer
  2026-05-13  9:28 ` [PATCH manager v4 1/3] ui: lxc/MPEdit: remove duplicate "mp" assignment Filip Schauer
  2026-05-13  9:28 ` [PATCH manager v4 2/3] d/control: bump versioned dependency for pve-container Filip Schauer
@ 2026-05-13  9:28 ` Filip Schauer
  2026-05-15  5:04 ` applied: [PATCH manager v4 0/3] ui: add container mount point idmapping Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Filip Schauer @ 2026-05-13  9:28 UTC (permalink / raw)
  To: pve-devel

Integrate UID/GID mapping for container mount points into the web UI.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
Changes since v3:
* Do not clear the list when toggling the passthrough checkbox.
* Add a "Clear" button next to "Add".

 www/manager6/Makefile          |   1 +
 www/manager6/lxc/IdMapField.js | 216 +++++++++++++++++++++++++++++++++
 www/manager6/lxc/MPEdit.js     |   8 ++
 3 files changed, 225 insertions(+)
 create mode 100644 www/manager6/lxc/IdMapField.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index f63437d6..85d973fe 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -210,6 +210,7 @@ JSSRC= 							\
 	lxc/DNS.js					\
 	lxc/FeaturesEdit.js				\
 	lxc/EnvEdit.js				\
+	lxc/IdMapField.js				\
 	lxc/MPEdit.js					\
 	lxc/MPResize.js					\
 	lxc/Network.js					\
diff --git a/www/manager6/lxc/IdMapField.js b/www/manager6/lxc/IdMapField.js
new file mode 100644
index 00000000..81f1c764
--- /dev/null
+++ b/www/manager6/lxc/IdMapField.js
@@ -0,0 +1,216 @@
+Ext.define('PVE.lxc.IdMapField', {
+    extend: 'Ext.form.FieldContainer',
+    xtype: 'pveLxcIdMapField',
+
+    layout: { type: 'vbox', align: 'stretch' },
+
+    controller: {
+        xclass: 'Ext.app.ViewController',
+
+        control: {
+            'grid proxmoxintegerfield,grid proxmoxKVComboBox': {
+                change: function (widget, value) {
+                    let me = this;
+                    let record = widget.getWidgetRecord();
+                    let column = widget.getWidgetColumn();
+                    if (!record || !column) {
+                        return;
+                    }
+                    record.set(column.dataIndex, value);
+                    record.commit();
+                    me.updateIdMapField();
+                },
+            },
+        },
+
+        onIdMapFieldChange: function (field, value) {
+            let me = this;
+            let passthrough = value === 'passthrough';
+            let checkbox = me.lookup('passthrough');
+            checkbox.suspendEvent('change');
+            checkbox.setValue(passthrough);
+            checkbox.resumeEvent('change');
+            me.lookup('idmaps').setVisible(!passthrough);
+            me.lookup('addIdMapButton').setVisible(!passthrough);
+            me.lookup('clearIdMapButton').setVisible(!passthrough);
+
+            let store = me.lookup('idmaps').getStore();
+            if (!passthrough && value) {
+                store.setData(
+                    value.split(';').map((v) => {
+                        let [type, ct, host, length] = v.split(':');
+                        return { type, ct, host, length };
+                    }),
+                );
+            } else {
+                store.removeAll();
+            }
+        },
+
+        onPassthroughCheckboxChange: function (checkbox, checked) {
+            let me = this;
+            let field = me.lookup('idmap');
+            if (checked) {
+                me.stashedIdMap = field.getValue();
+                field.setValue('passthrough');
+            } else {
+                field.setValue(me.stashedIdMap || '');
+            }
+        },
+
+        addIdMap: function () {
+            let me = this;
+            me.lookup('idmaps').getStore().add({ type: 'u', ct: '', host: '', length: '' });
+            me.updateIdMapField();
+        },
+
+        removeIdMap: function (button) {
+            let me = this;
+            me.lookup('idmaps').getStore().remove(button.getWidgetRecord());
+            me.updateIdMapField();
+        },
+
+        clearIdMap: function () {
+            let me = this;
+            me.lookup('idmaps').getStore().removeAll();
+            me.updateIdMapField();
+        },
+
+        updateIdMapField: function () {
+            let me = this;
+            let value = me
+                .lookup('idmaps')
+                .getStore()
+                .getRange()
+                .map(({ data: { type, ct, host, length } }) => `${type}:${ct}:${host}:${length}`)
+                .join(';');
+            let field = me.lookup('idmap');
+            field.suspendEvent('change');
+            field.setValue(value);
+            field.resumeEvent('change');
+        },
+    },
+
+    items: [
+        {
+            xtype: 'proxmoxcheckbox',
+            reference: 'passthrough',
+            fieldLabel: gettext('ID Mapping'),
+            boxLabel: gettext('Passthrough'),
+            isFormField: false,
+            listeners: {
+                change: 'onPassthroughCheckboxChange',
+            },
+        },
+        {
+            xtype: 'grid',
+            height: 170,
+            scrollable: true,
+            reference: 'idmaps',
+            viewConfig: {
+                emptyText: gettext('No ID maps configured'),
+            },
+            store: {
+                fields: ['type', 'ct', 'host', 'length'],
+                data: [],
+            },
+            columns: [
+                {
+                    text: gettext('ID Type'),
+                    xtype: 'widgetcolumn',
+                    dataIndex: 'type',
+                    widget: {
+                        xtype: 'proxmoxKVComboBox',
+                        margin: '4 0',
+                        allowBlank: false,
+                        comboItems: [
+                            ['u', 'UID'],
+                            ['g', 'GID'],
+                        ],
+                    },
+                    flex: 1,
+                },
+                {
+                    text: gettext('Container'),
+                    xtype: 'widgetcolumn',
+                    dataIndex: 'ct',
+                    widget: {
+                        xtype: 'proxmoxintegerfield',
+                        margin: '4 0',
+                        emptyText: gettext('Container'),
+                        allowBlank: false,
+                        minValue: 0,
+                    },
+                    flex: 1,
+                },
+                {
+                    text: gettext('Host'),
+                    xtype: 'widgetcolumn',
+                    dataIndex: 'host',
+                    widget: {
+                        xtype: 'proxmoxintegerfield',
+                        margin: '4 0',
+                        emptyText: gettext('Host'),
+                        allowBlank: false,
+                        minValue: 0,
+                    },
+                    flex: 1,
+                },
+                {
+                    text: gettext('Range Size'),
+                    xtype: 'widgetcolumn',
+                    dataIndex: 'length',
+                    widget: {
+                        xtype: 'proxmoxintegerfield',
+                        margin: '4 0',
+                        emptyText: gettext('Range Size'),
+                        allowBlank: false,
+                        minValue: 1,
+                    },
+                    flex: 1,
+                },
+                {
+                    xtype: 'widgetcolumn',
+                    width: 40,
+                    widget: {
+                        xtype: 'button',
+                        margin: '4 0',
+                        iconCls: 'fa fa-trash-o',
+                        handler: 'removeIdMap',
+                    },
+                },
+            ],
+        },
+        {
+            xtype: 'container',
+            layout: { type: 'hbox' },
+            defaults: { margin: '0 2' },
+            items: [
+                {
+                    xtype: 'button',
+                    reference: 'addIdMapButton',
+                    text: gettext('Add'),
+                    iconCls: 'fa fa-plus-circle',
+                    handler: 'addIdMap',
+                    flex: 1,
+                },
+                {
+                    xtype: 'button',
+                    reference: 'clearIdMapButton',
+                    text: gettext('Clear'),
+                    iconCls: 'fa fa-trash-o',
+                    handler: 'clearIdMap',
+                    flex: 1,
+                },
+            ],
+        },
+        {
+            xtype: 'hidden',
+            reference: 'idmap',
+            name: 'idmap',
+            listeners: {
+                change: 'onIdMapFieldChange',
+            },
+        },
+    ],
+});
diff --git a/www/manager6/lxc/MPEdit.js b/www/manager6/lxc/MPEdit.js
index b1f67741..b193ff89 100644
--- a/www/manager6/lxc/MPEdit.js
+++ b/www/manager6/lxc/MPEdit.js
@@ -47,6 +47,7 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
         setMPOpt('acl', values.acl);
         setMPOpt('replicate', values.replicate);
         setMPOpt('keepattrs', values.keepattrs);
+        setMPOpt('idmap', values.idmap);
 
         let res = {};
         res[confid] = PVE.Parser.printLxcMountPoint(me.mp);
@@ -353,6 +354,13 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
             },
         },
     ],
+
+    advancedColumnB: [
+        {
+            xtype: 'pveLxcIdMapField',
+            name: 'idmap',
+        },
+    ],
 });
 
 Ext.define('PVE.lxc.MountPointEdit', {
-- 
2.47.3





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

* applied: [PATCH manager v4 0/3] ui: add container mount point idmapping
  2026-05-13  9:28 [PATCH manager v4 0/3] ui: add container mount point idmapping Filip Schauer
                   ` (2 preceding siblings ...)
  2026-05-13  9:28 ` [PATCH manager v4 3/3] ui: lxc/MPEdit: add "idmap" option Filip Schauer
@ 2026-05-15  5:04 ` Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2026-05-15  5:04 UTC (permalink / raw)
  To: pve-devel, Filip Schauer

On Wed, 13 May 2026 11:28:25 +0200, Filip Schauer wrote:
> Integrate UID/GID mapping for container mount points into the web UI.
> 
> Changes since v3:
> * Do not clear the list when toggling the passthrough checkbox.
> * Add a "Clear" button next to "Add".
> 
> Changes since v2:
> * Replace segmented None/Passthrough/Custom button
>   with passthrough checkbox
> * Replace segmented UID/GID button with combobox
> * Factor the idmap grid out into its own component
> 
> [...]

Applied, thanks!

[1/3] ui: lxc/MPEdit: remove duplicate "mp" assignment
      commit: ad0f9211d781577b507ba37dea0973ca58ea69bf
[2/3] d/control: bump versioned dependency for pve-container
      commit: b10c2570e92a80a9e6d348ba450d36466097749c
[3/3] ui: lxc/MPEdit: add "idmap" option
      commit: 839ef7c89682029ec1e6496ef4514cfe9edbc771




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

end of thread, other threads:[~2026-05-15  5:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13  9:28 [PATCH manager v4 0/3] ui: add container mount point idmapping Filip Schauer
2026-05-13  9:28 ` [PATCH manager v4 1/3] ui: lxc/MPEdit: remove duplicate "mp" assignment Filip Schauer
2026-05-13  9:28 ` [PATCH manager v4 2/3] d/control: bump versioned dependency for pve-container Filip Schauer
2026-05-13  9:28 ` [PATCH manager v4 3/3] ui: lxc/MPEdit: add "idmap" option Filip Schauer
2026-05-15  5:04 ` applied: [PATCH manager v4 0/3] ui: add container mount point idmapping Thomas Lamprecht

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