Close #822: show the nodename in the page title
This commit is contained in:
parent
b18a710eaf
commit
2ef37c7b05
@ -4,7 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
sub get_index {
|
||||
my ($lang, $username, $csrftoken, $console) = @_;
|
||||
my ($lang, $username, $csrftoken, $console, $nodename) = @_;
|
||||
|
||||
my $page = <<_EOD;
|
||||
<!DOCTYPE html>
|
||||
@ -12,7 +12,7 @@ sub get_index {
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10">
|
||||
<title>Proxmox Virtual Environment</title>
|
||||
<title>$nodename - Proxmox Virtual Environment</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/pve2/ext4/resources/css/ext-all.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/pve2/css/ext-pve.css" />
|
||||
|
@ -7,7 +7,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
sub get_index {
|
||||
my ($lang, $username, $csrftoken, $console) = @_;
|
||||
my ($lang, $username, $csrftoken, $console, $nodename) = @_;
|
||||
|
||||
my $manager_source_dir = '/usr/share/pve-manager/manager6/';
|
||||
|
||||
@ -21,7 +21,7 @@ sub get_index {
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Proxmox Virtual Environment</title>
|
||||
<title>$nodename - Proxmox Virtual Environment</title>
|
||||
<link rel="stylesheet" type="text/css" href="/pve2/ext6/theme-triton/resources/theme-triton-all.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/pve2/css/ext-pve.css" />
|
||||
<script type="text/javascript" src="/pve2/ext6/ext-all-debug.js"></script>
|
||||
|
@ -4,13 +4,13 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
sub get_index {
|
||||
my ($lang, $username, $csrftoken, $console) = @_;
|
||||
my ($lang, $username, $csrftoken, $console, $nodename) = @_;
|
||||
|
||||
my $page = <<_EOD;
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Proxmox Console</title>
|
||||
<title>$nodename - Proxmox Console</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<!-- Apple iOS Safari settings -->
|
||||
|
@ -117,7 +117,7 @@ sub init {
|
||||
},
|
||||
# Note: there is no authentication for those pages and dirs!
|
||||
pages => {
|
||||
'/' => \&get_index,
|
||||
'/' => sub { get_index($self->{nodename}, @_) },
|
||||
# avoid authentication when accessing favicon
|
||||
'/favicon.ico' => {
|
||||
file => '/usr/share/pve-manager/images/favicon.ico',
|
||||
@ -171,7 +171,7 @@ sub is_phone {
|
||||
# so we must be very careful here
|
||||
|
||||
sub get_index {
|
||||
my ($server, $r, $args) = @_;
|
||||
my ($nodename, $server, $r, $args) = @_;
|
||||
|
||||
my $lang = 'en';
|
||||
my $username;
|
||||
@ -205,13 +205,13 @@ sub get_index {
|
||||
my $page;
|
||||
|
||||
if (defined($args->{console}) && $args->{novnc}) {
|
||||
$page = PVE::NoVncIndex::get_index($lang, $username, $token, $args->{console});
|
||||
$page = PVE::NoVncIndex::get_index($lang, $username, $token, $args->{console}, $nodename);
|
||||
} elsif ($mobile) {
|
||||
$page = PVE::TouchIndex::get_index($lang, $username, $token, $args->{console});
|
||||
$page = PVE::TouchIndex::get_index($lang, $username, $token, $args->{console}, $nodename);
|
||||
} elsif ($ext6 && $ext6_dir_exists) {
|
||||
$page = PVE::ExtJSIndex6::get_index($lang, $username, $token, $args->{console});
|
||||
$page = PVE::ExtJSIndex6::get_index($lang, $username, $token, $args->{console}, $nodename);
|
||||
} else {
|
||||
$page = PVE::ExtJSIndex::get_index($lang, $username, $token, $args->{console});
|
||||
$page = PVE::ExtJSIndex::get_index($lang, $username, $token, $args->{console}, $nodename);
|
||||
}
|
||||
my $headers = HTTP::Headers->new(Content_Type => "text/html; charset=utf-8");
|
||||
my $resp = HTTP::Response->new(200, "OK", $headers, $page);
|
||||
|
@ -4,14 +4,14 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
sub get_index {
|
||||
my ($lang, $username, $csrftoken, $console) = @_;
|
||||
my ($lang, $username, $csrftoken, $console, $nodename) = @_;
|
||||
|
||||
my $page = <<_EOD;
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Proxmox Virtual Environment</title>
|
||||
<title>$nodename - Proxmox Virtual Environment</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/pve2/touch/resources/css/sencha-touch.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/pve2/touch/resources/css/pve.css" />
|
||||
|
@ -65,8 +65,6 @@ Ext.define('PVE.Workspace', {
|
||||
}
|
||||
});
|
||||
|
||||
document.title = me.title;
|
||||
|
||||
me.callParent();
|
||||
|
||||
if (!PVE.Utils.authOK()) {
|
||||
|
@ -65,8 +65,6 @@ Ext.define('PVE.Workspace', {
|
||||
}
|
||||
});
|
||||
|
||||
document.title = me.title;
|
||||
|
||||
me.callParent();
|
||||
|
||||
if (!PVE.Utils.authOK()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user