* [PATCH manager] fix #8046: ui: ceph: fix muting a health check with no expiry
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
0 siblings, 0 replies; 2+ messages in thread
From: Kefu Chai @ 2026-09-27 14:18 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread