Enhance pveproxy by adding an optional ext5 parameter to load the extjs 5 framework
Calling the pveproxy with https://localhost:8006/?ext5=1 will load the web ui with the extjs 5 js libs. Please note that at the momment the workspace does not load with extjs 5. Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
This commit is contained in:
parent
67a1a03e32
commit
3852d71842
@ -7,6 +7,7 @@ PERLSOURCE = \
|
||||
API2Tools.pm \
|
||||
API2Client.pm \
|
||||
ExtJSIndex.pm \
|
||||
ExtJSIndex5.pm \
|
||||
TouchIndex.pm \
|
||||
NoVncIndex.pm \
|
||||
HTTPServer.pm \
|
||||
|
19
bin/pveproxy
19
bin/pveproxy
@ -22,6 +22,7 @@ use PVE::API2::Formatter::HTML;
|
||||
use PVE::HTTPServer;
|
||||
|
||||
use PVE::ExtJSIndex;
|
||||
use PVE::ExtJSIndex5;
|
||||
use PVE::NoVncIndex;
|
||||
use PVE::TouchIndex;
|
||||
|
||||
@ -204,18 +205,22 @@ sub get_index {
|
||||
$mobile = $args->{mobile} ? 1 : 0;
|
||||
}
|
||||
|
||||
my $ext5;
|
||||
if (defined($args->{ext5})) {
|
||||
$ext5 = $args->{ext5} ? 1 : 0;
|
||||
}
|
||||
|
||||
my $page;
|
||||
|
||||
if (defined($args->{console}) && $args->{novnc}) {
|
||||
$page = PVE::NoVncIndex::get_index($lang, $username, $token, $args->{console});
|
||||
} else {
|
||||
if ($mobile) {
|
||||
$page = PVE::TouchIndex::get_index($lang, $username, $token, $args->{console});
|
||||
$page = PVE::NoVncIndex::get_index($lang, $username, $token, $args->{console});
|
||||
} elsif ($mobile) {
|
||||
$page = PVE::TouchIndex::get_index($lang, $username, $token, $args->{console});
|
||||
} elsif ($ext5) {
|
||||
$page = PVE::ExtJSIndex5::get_index($lang, $username, $token, $args->{console});
|
||||
} else {
|
||||
$page = PVE::ExtJSIndex::get_index($lang, $username, $token, $args->{console});
|
||||
$page = PVE::ExtJSIndex::get_index($lang, $username, $token, $args->{console});
|
||||
}
|
||||
}
|
||||
|
||||
my $headers = HTTP::Headers->new(Content_Type => "text/html; charset=utf-8");
|
||||
my $resp = HTTP::Response->new(200, "OK", $headers, $page);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user