From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id A444E1FF0B4 for ; Sun, 27 Sep 2026 16:18:28 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8CE1D2165F; Sun, 27 Sep 2026 16:18:26 +0200 (CEST) From: Kefu Chai 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 Message-ID: <20260927141817.356589-1-k.chai@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260927141618.353735-1-k.chai@proxmox.com> References: <20260927141618.353735-1-k.chai@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1790518702170 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.424 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: KO7WV5B2AR6EH4CUEOFPE7Z3HFGW52CR X-Message-ID-Hash: KO7WV5B2AR6EH4CUEOFPE7Z3HFGW52CR X-MailFrom: k.chai@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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