* [PATCH manager 1/2] fix #5475: configurable window title
2026-07-03 11:55 [RFC cluster/manager 0/2] Configurable window titles for nodes Thomas Ellmenreich
@ 2026-07-03 11:55 ` Thomas Ellmenreich
2026-07-03 11:55 ` [PATCH cluster 2/2] " Thomas Ellmenreich
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Ellmenreich @ 2026-07-03 11:55 UTC (permalink / raw)
To: pve-devel; +Cc: Thomas Ellmenreich
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 <t.ellmenreich@proxmox.com>
---
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();
+ }
+
+ 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 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <title>[% nodename %] - Proxmox Virtual Environment</title>
+ <title>[% window_title %]</title>
<link rel="icon" sizes="128x128" href="/pve2/images/logo-128.png" />
<link rel="apple-touch-icon" sizes="128x128" href="/pve2/images/logo-128.png" />
<link rel="stylesheet" type="text/css" href="/pve2/ext6/theme-crisp/resources/theme-crisp-all.css?ver=7.0.0" />
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',
+ },
+
+ 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',
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH cluster 2/2] fix #5475: configurable window title
2026-07-03 11:55 [RFC cluster/manager 0/2] Configurable window titles for nodes Thomas Ellmenreich
2026-07-03 11:55 ` [PATCH manager 1/2] fix #5475: configurable window title Thomas Ellmenreich
@ 2026-07-03 11:55 ` Thomas Ellmenreich
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Ellmenreich @ 2026-07-03 11:55 UTC (permalink / raw)
To: pve-devel; +Cc: Thomas Ellmenreich
Added new configuration option that will determine the content
of the window title for a pve-manager tab.
Signed-off-by: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
---
src/PVE/DataCenterConfig.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index 004122e..480193a 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -436,6 +436,13 @@ my $datacenter_schema = {
# FIXME: remove 'applet' with 9.0 (add pve8to9 check!)
enum => ['applet', 'vv', 'html5', 'xtermjs'],
},
+ window_title => {
+ optional => 1,
+ type => 'string',
+ description =>
+ "Define the text shown in the window title for all nodes of this cluster",
+ enum => ['nodeandcluster', 'fqdn'],
+ },
email_from => {
optional => 1,
type => 'string',
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread