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 7D8C01FF0AF for ; Thu, 24 Sep 2026 11:53:20 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 43586216C0; Thu, 24 Sep 2026 11:53:05 +0200 (CEST) From: Thomas Ellmenreich To: pve-devel@lists.proxmox.com Subject: [PATCH cluster/manager v5 0/2] Configurable window titles for nodes Date: Thu, 24 Sep 2026 11:52:49 +0200 Message-ID: <20260924095251.143579-1-t.ellmenreich@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1790243579353 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.508 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: MJN4EKAPLFCNQ2PRT5VC7RQNOHKEXIX6 X-Message-ID-Hash: MJN4EKAPLFCNQ2PRT5VC7RQNOHKEXIX6 X-MailFrom: t.ellmenreich@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 CC: Thomas Ellmenreich X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Thank you @Dominik, @Thomas, @Elias, @Arthur for your comments. Configurable window titles for nodes ==================================== Currently the window title is fixed to the following string: $nodename - Proxmox Virtual Environment This has become problematic for users with multiple clusters, each containing the same node name. To help distinguish between tabs, it has been requested [1] that the window title be made configurable with the fqdn as an option. [1] https://bugzilla.proxmox.com/show_bug.cgi?id=5475 Implementation -------------- After considering the different options, I have deemed a server side implementation, through the datacenter.cfg, to be the better option. Specifically because of its durability across sessions and because it automatically configures the title for all users and all nodes across the cluster. The config now contains a new ui-settings format string which then in turn contains a 'title' enum field for the window title. This enum string will then be converted to a window title and inserted in the index.html.tpl template on every request. The current enum options are: - default - Displays the default '$nodename - Proxmox Virtual Environment' string if the config enum is not present - 'node-and-cluster' - Displays the nodename and then the clustername in the following style: '$nodename - $clustername - Proxmox Virtual Environment' - 'fqdn' - Displays the current fqdn as returned by `PVE::Tools::get_fqdn()` like so: '$fqdn - Proxmox Virtual Environment' Possible future extensions -------------------------- - If proper cross-node user settings are implemented in the future, they could be used to allow users to define their own window title settings and have these settings be persisted across sessions - One of the selection options for window titles could be a user defined template string which would allow users of PVE to define their own window titles. Changes since v4 ---------------- - When the window title is set to fqdn, cache it instead of fetching it on every request. The fetch happens on restart and every 24 hours. - Reordering of the window title construction so that it will always fall back to the original default. - In the settings overview, the window title settings are now properly shown instead of showing the enum value. - Wrapped some text with 'gettext'. - Reordering of the patches since the (now) second one depends on the first one. Changes since v3 ---------------- - rebased on master Changes since v2 ---------------- - The creation of the final title is now wrapped in an 'eval' block to catch any exceptions. If an error occurs or the return value is undefined, the default title is shown. - `get_fqdn` is now correctly called with the $nodename. Thanks @Elias ;) - The combo box showing the title options now displays descriptive names for the different options instead of an example of what the real title would look like. Changes since v1 ---------------- - Instead of storing the 'window-title' setting directly in the datacenter.cfg its now nested in a more general 'ui-settings' format string. This allows easier expansion in the future - All adjustments that were needed to create the 'ui-settings' format string Changes since RFC ----------------- - change of the `datacenter.cfg` setting title from "windowtitle" to "window-title" - renamed `nodeandcluster` to `node-and-cluster` - added the " - Proxmox Virtual Environment" trailer to all titles - removed the questions from this text and added the "Possible future extensions" section pve-cluster: Thomas Ellmenreich (1): fix #5475: configurable window title src/PVE/DataCenterConfig.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) pve-manager: Thomas Ellmenreich (1): fix #5475: configurable window title PVE/Service/pveproxy.pm | 35 ++++++++++++++++++++ www/index.html.tpl | 2 +- www/manager6/UIOptions.js | 6 ++++ www/manager6/dc/OptionView.js | 61 +++++++++++++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 1 deletion(-) Summary over all repositories: 5 files changed, 128 insertions(+), 1 deletions(-) -- Generated by murpp 0.12.0