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

Leo Nunner l.nunner at proxmox.com
Wed Feb 8 10:05:26 CET 2023


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>
---
Changes from v1:
    - use gettext for the Subdirectory label

 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..8040bc85 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: gettext('Subdirectory'),
+		allowBlank: true,
+		emptyText: gettext('/some/path'),
+	    },
 	];
 
 	me.callParent();
-- 
2.30.2






More information about the pve-devel mailing list