[pve-devel] [PATCH manager 1/1] fix #2641: expose CIFS subdir parameter through GUI

Leo Nunner l.nunner at proxmox.com
Thu Dec 1 12:32:56 CET 2022


makes it possible to optionally set the 'subdir' parameter when adding a
new CIFS storage.

Signed-off-by: Leo Nunner <l.nunner at proxmox.com>
---
RFC: I'm not sure whether this should be exposed, since it's not
available for CephFS either, but it might be a good idea to make this
more obvious to the user.

 www/manager6/storage/CIFSEdit.js | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/www/manager6/storage/CIFSEdit.js b/www/manager6/storage/CIFSEdit.js
index 71415401..4c06de5e 100644
--- a/www/manager6/storage/CIFSEdit.js
+++ b/www/manager6/storage/CIFSEdit.js
@@ -129,6 +129,9 @@ Ext.define('PVE.storage.CIFSInputPanel', {
 	if (values.username?.length === 0) {
 	    delete values.username;
 	}
+	if (values.subdir?.length === 0) {
+	    delete values.subdir;
+	}
 
 	return me.callParent([values]);
     },
@@ -216,6 +219,14 @@ Ext.define('PVE.storage.CIFSInputPanel', {
 		    },
 		},
 	    },
+	    {
+		xtype: 'pmxDisplayEditField',
+		editable: me.isCreate,
+		name: 'subdir',
+		fieldLabel: 'Subdirectory',
+		allowBlank: true,
+		emptyText: gettext('/some/path'),
+	    },
 	];
 
 	me.callParent();
-- 
2.30.2






More information about the pve-devel mailing list