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 C830E1FF0F7 for ; Tue, 14 Jul 2026 08:47:15 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2A469213A7; Tue, 14 Jul 2026 08:47:15 +0200 (CEST) Message-ID: Date: Tue, 14 Jul 2026 08:47:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH manager 1/2] fix #5475: configurable window title To: Thomas Ellmenreich , pve-devel@lists.proxmox.com References: <20260703115530.106413-1-t.ellmenreich@proxmox.com> <20260703115530.106413-2-t.ellmenreich@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260703115530.106413-2-t.ellmenreich@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784011615307 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.376 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_LOW -0.7 Sender listed at https://www.dnswl.org/, low 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: MOIIIW5SOCVBTVVUBFYQABKKGOQONBTR X-Message-ID-Hash: MOIIIW5SOCVBTVVUBFYQABKKGOQONBTR X-MailFrom: d.csapak@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: one comment inline On 7/3/26 1:56 PM, Thomas Ellmenreich wrote: > Allows for setting of the new 'window_title' datacenter.cfg option > through the ui. > > Adjusted the index.html templating to construct the correct window title > on every request according to the cluster configuration. > > Signed-off-by: Thomas Ellmenreich > --- > PVE/Service/pveproxy.pm | 21 +++++++++++++++++++++ > www/index.html.tpl | 2 +- > www/manager6/Utils.js | 11 +++++++++++ > www/manager6/dc/OptionView.js | 6 ++++++ > 4 files changed, 39 insertions(+), 1 deletion(-) > > diff --git a/PVE/Service/pveproxy.pm b/PVE/Service/pveproxy.pm > index c6011a00..1295f50f 100755 > --- a/PVE/Service/pveproxy.pm > +++ b/PVE/Service/pveproxy.pm > @@ -202,6 +202,24 @@ my sub get_path_mtime { > return $mtime; > } > > +# builds the window title from the datacenter.cfg configuration > +my $get_window_title = sub { > + my ($title_enum, $nodename) = @_; > + > + my $title = "$nodename - Proxmox Virtual Environment"; > + > + if ($title_enum eq "nodeandcluster") { > + my $clinfo = PVE::Cluster::get_clinfo(); > + my $clustername = $clinfo->{cluster}->{name}; > + > + $title = "$nodename - $clustername"; > + } elsif ($title_enum eq "fqdn") { > + $title = PVE::Tools::get_fqdn(); > + } > + aside from the discussion which options are actually included, I'd add 'proxmox virtual environment' for all titles, not only the default one. having more information at the end of the title shouldn't hurt, but can possibly help users identify the tab quicker > + return $title; > +}; > + > # NOTE: Requests to those pages are not authenticated so we must be very careful here > sub get_index { > my ($nodename, $server, $r, $args) = @_; > @@ -232,10 +250,12 @@ sub get_index { > } > } > > + my $window_title; > my $consent_text; > eval { > my $dc_conf = PVE::Cluster::cfs_read_file('datacenter.cfg'); > $consent_text = $dc_conf->{'consent-text'}; > + $window_title = $get_window_title->($dc_conf->{'window_title'}, $nodename); > > if (!$lang) { > $lang = $dc_conf->{language} // 'en'; > @@ -276,6 +296,7 @@ sub get_index { > token => $token, > console => $args->{console}, > nodename => $nodename, > + window_title => $window_title, > debug => $debug, > version => "$version", > wtversion => $wtversion, > diff --git a/www/index.html.tpl b/www/index.html.tpl > index 74ee02d9..5138b7cc 100644 > --- a/www/index.html.tpl > +++ b/www/index.html.tpl > @@ -4,7 +4,7 @@ > > > > - [% nodename %] - Proxmox Virtual Environment > + [% window_title %] > > > > diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js > index 040b5ae0..88ab5b8d 100644 > --- a/www/manager6/Utils.js > +++ b/www/manager6/Utils.js > @@ -679,6 +679,17 @@ Ext.define('PVE.Utils', { > return PVE.Utils.console_map[value] || value; > }, > > + windowTitleMap: { > + __default__: '$nodename - Proxmox Virtual Environment', > + nodeandcluster: '$nodename - $clustername', > + fqdn: 'Fully Qualified Domain Name', > + }, we'd need to adapt these texts then ofc when my above suggestions is used. > + > + renderWindowTitleViewer: function (value) { > + value = value || '__default__'; > + return PVE.Utils.windowTitleMap[value] || value; > + }, > + > render_kvm_vga_driver: function (value) { > if (!value) { > return Proxmox.Utils.defaultText; > diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js > index dc12aa7e..7091ca0d 100644 > --- a/www/manager6/dc/OptionView.js > +++ b/www/manager6/dc/OptionView.js > @@ -91,6 +91,12 @@ Ext.define('PVE.dc.OptionView', { > defaultValue: '__default__', > deleteEmpty: true, > }); > + me.add_combobox_row('window_title', gettext('Window Title'), { > + renderer: PVE.Utils.renderWindowTitleViewer, > + comboItems: Object.entries(PVE.Utils.windowTitleMap), > + defaultValue: '__default__', > + deleteEmpty: true, > + }); > me.add_text_row('email_from', gettext('Email from address'), { > deleteEmpty: true, > vtype: 'proxmoxMail',