From: Elias Huhsovitz <e.huhsovitz@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Elias Huhsovitz <e.huhsovitz@proxmox.com>
Subject: [PATCH manager v3 2/2] ui: storage: add mount options field for cephfs
Date: Thu, 30 Jul 2026 11:40:55 +0200 [thread overview]
Message-ID: <20260730094055.57659-3-e.huhsovitz@proxmox.com> (raw)
In-Reply-To: <20260730094055.57659-1-e.huhsovitz@proxmox.com>
Add a text field for custom mount options to the CephFS
storage configuration dialog. This allows users to configure
advanced mount parameters (like 'ms_mode' or 'mount_timeout')
directly via the web interface, without needing to use the CLI
or manually edit storage.cfg.
When mount options are being changed:
Display a hint to the user that changes will require
remounting the storage to take effect.
Reduce the usage of `var` keyword in CephFSEdit.js.
Signed-off-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
---
www/manager6/storage/CephFSEdit.js | 59 +++++++++++++++++++++++++++++-
1 file changed, 58 insertions(+), 1 deletion(-)
diff --git a/www/manager6/storage/CephFSEdit.js b/www/manager6/storage/CephFSEdit.js
index db54df87..1c7a9bd9 100644
--- a/www/manager6/storage/CephFSEdit.js
+++ b/www/manager6/storage/CephFSEdit.js
@@ -8,17 +8,46 @@ Ext.define('PVE.storage.CephFSInputPanel', {
type: 'cephstorage',
},
+ onGetValues: function (values) {
+ const me = this;
+
+ if (values.options) {
+ values.options = values.options
+ .split(',')
+ .map((opt) => opt.trim())
+ .filter((opt, index, self) => opt !== '' && self.indexOf(opt) === index)
+ .join(',');
+ }
+
+ if (!values.options) {
+ delete values.options;
+ if (!me.isCreate) {
+ values.delete = values.delete ? `${values.delete},options` : 'options';
+ }
+ }
+
+ return me.callParent([values]);
+ },
+
setValues: function (values) {
if (values.monhost) {
this.viewModel.set('pveceph', false);
this.lookupReference('pvecephRef').setValue(false);
this.lookupReference('pvecephRef').resetOriginalValue();
}
+
+ this.originalOptions = values.options || '';
+
this.callParent([values]);
+
+ const hint = this.down('#mountOptionsHint');
+ if (hint) {
+ hint.setHidden(true);
+ }
},
initComponent: function () {
- var me = this;
+ const me = this;
if (!me.nodename) {
me.nodename = 'localhost';
@@ -132,6 +161,34 @@ Ext.define('PVE.storage.CephFSInputPanel', {
},
];
+ me.advancedColumnB = me.advancedColumnB || [];
+
+ me.advancedColumnB.push({
+ xtype: 'textfield',
+ name: 'options',
+ fieldLabel: gettext('Mount Options'),
+ emptyText: `${gettext('Example')}: ms_mode=secure, mount_timeout=60`,
+ allowBlank: true,
+ listeners: {
+ change: function (field, newValue) {
+ const hint = me.down('#mountOptionsHint');
+ if (hint) {
+ hint.setHidden(me.isCreate || (newValue || '') === me.originalOptions);
+ }
+ },
+ },
+ });
+
+ me.advancedColumnB.push({
+ xtype: 'displayfield',
+ itemId: 'mountOptionsHint',
+ userCls: 'pmx-hint',
+ hidden: true,
+ value: gettext(
+ 'Changes to mount options require remounting the storage to take effect.',
+ ),
+ });
+
me.callParent();
},
});
--
2.47.3
prev parent reply other threads:[~2026-07-30 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 9:40 [PATCH manager v3 0/2] fix #6855: ui: storage: add mount options field for nfs, cifs, cephfs Elias Huhsovitz
2026-07-30 9:40 ` [PATCH manager v3 1/2] fix #6855: ui: storage: add mount options field for nfs amd smb/cifs Elias Huhsovitz
2026-07-30 9:40 ` Elias Huhsovitz [this message]
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=20260730094055.57659-3-e.huhsovitz@proxmox.com \
--to=e.huhsovitz@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