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 1ED031FF0B3 for ; Thu, 26 Nov 2026 14:42:28 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 6FFBD217C2; Thu, 26 Nov 2026 14:41:59 +0100 (CET) From: Jonas Theisen To: pve-devel@lists.proxmox.com Subject: [PATCH widget-toolkit 05/16] node: time: do not open the editor for the server time row Date: Thu, 26 Nov 2026 14:40:02 +0100 Message-ID: <20261126134128.316681-6-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261126134128.316681-1-j.theisen@proxmox.com> References: <20261126134128.316681-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795700508670 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.070 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: YFRBDPE3FBEPOXVHYLMD3FE6ISHBPJBE X-Message-ID-Hash: YFRBDPE3FBEPOXVHYLMD3FE6ISHBPJBE X-MailFrom: j.theisen@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: The server time cannot be edited, so opening the edit window when double clicking or pressing enter on its row is unexpected. Do nothing for this row instead. Signed-off-by: Jonas Theisen --- src/node/TimeView.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/node/TimeView.js b/src/node/TimeView.js index cb74585..20214eb 100644 --- a/src/node/TimeView.js +++ b/src/node/TimeView.js @@ -23,11 +23,19 @@ Ext.define('Proxmox.node.TimeView', { win.on('destroy', me.reload, me); }; + // the server time is read-only, so its row has no action + let run_row_action = () => { + let key = me.getSelectionModel().getSelection()[0]?.data.key; + if (key !== 'localtime') { + run_editor(); + } + }; + Ext.apply(me, { url: `/api2/json/nodes/${me.nodename}/time`, cwidth1: 150, interval: 1000, - run_editor: run_editor, + run_editor: run_row_action, rows: { timezone: { header: gettext('Time zone'), @@ -46,7 +54,7 @@ Ext.define('Proxmox.node.TimeView', { }, ], listeners: { - itemdblclick: run_editor, + itemdblclick: run_row_action, }, }); -- 2.47.3