[pve-devel] [PATCH manager v2 2/2] ui: lxc: add readonly option for device passthrough

Filip Schauer f.schauer at proxmox.com
Wed Jul 24 19:18:57 CEST 2024


Add a checkbox to the device passthrough dialogue for restricting
container write access to a passed through device.

Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
---
 www/manager6/lxc/DeviceEdit.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/www/manager6/lxc/DeviceEdit.js b/www/manager6/lxc/DeviceEdit.js
index cdbd9acc..fffb9624 100644
--- a/www/manager6/lxc/DeviceEdit.js
+++ b/www/manager6/lxc/DeviceEdit.js
@@ -95,6 +95,13 @@ Ext.define('PVE.lxc.DeviceInputPanel', {
 		return gettext("Access mode has to be an octal number");
 	    },
 	},
+	{
+	    xtype: 'checkbox',
+	    name: 'deny_write',
+	    fieldLabel: gettext('Read only'),
+	    labelWidth: 120,
+	    checked: false,
+	},
     ],
 });
 
@@ -145,6 +152,7 @@ Ext.define('PVE.lxc.DeviceEdit', {
 		    mode: data.mode,
 		    uid: data.uid,
 		    gid: data.gid,
+		    deny_write: data.deny_write,
 		};
 
 		ipanel.setValues(values);
-- 
2.39.2





More information about the pve-devel mailing list