From: Kefu Chai <k.chai@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] fix #8046: ui: ceph: fix muting a health check with no expiry
Date: Sun, 27 Sep 2026 22:18:17 +0800 [thread overview]
Message-ID: <20260927141817.356589-1-k.chai@proxmox.com> (raw)
In-Reply-To: <20260927141618.353735-1-k.chai@proxmox.com>
Ext.form.field.ComboBox cannot round-trip an empty string as a store
record's key. Selecting the 'No expiry' item, keyed '', submitted the
record's internal id (e.g. 'KeyValue-1') instead, and the API rejected
that as an invalid ttl.
The cause is in Proxmox.form.KVComboBox's backing model: it uses the
same field, 'key', for both idProperty and valueField. Ext.data.Model
replaces a falsy id with an autogenerated one on that field, so a
record keyed '' gets its key overwritten. Use the toolkit's
'__default__' sentinel instead; Proxmox.form.KVComboBox already drops
that value on submit, so choosing no expiry now sends no ttl at all.
Most other proxmoxKVComboBox fields in this tree already key their
'unset' item as '__default__' (AuthEditLDAP.js, MachineEdit.js,
SystemEdit.js, and roughly two dozen more); HealthMute.js was the one
place still using ''.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
www/manager6/ceph/HealthMute.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/www/manager6/ceph/HealthMute.js b/www/manager6/ceph/HealthMute.js
index 8ea73635..5d356686 100644
--- a/www/manager6/ceph/HealthMute.js
+++ b/www/manager6/ceph/HealthMute.js
@@ -14,12 +14,14 @@ Ext.define('PVE.ceph.HealthMuteInputPanel', {
name: 'ttl',
fieldLabel: gettext('Duration'),
editable: true,
- value: '',
+ value: '__default__',
// without this an empty field is submitted as a request to delete the property,
// which this endpoint does not accept
deleteEmpty: false,
comboItems: [
- ['', gettext('No expiry')],
+ // KVComboBox cannot round-trip an empty string as a key, so use the
+ // toolkit's '__default__' sentinel, which it already drops on submit
+ ['__default__', gettext('No expiry')],
['1h', gettext('1 hour')],
['1d', gettext('1 day')],
['1w', gettext('1 week')],
--
2.47.3
prev parent reply other threads:[~2026-09-27 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 14:16 [PATCH manager 0/1] ui: ceph: fix muting a health check with no expiry Kefu Chai
2026-09-27 14:18 ` Kefu Chai [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=20260927141817.356589-1-k.chai@proxmox.com \
--to=k.chai@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