Commit 3852d718 authored by Emmanuel Kasper's avatar Emmanuel Kasper Committed by Dietmar Maurer

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: 's avatarEmmanuel Kasper <e.kasper@proxmox.com>
parent 67a1a03e
...@@ -7,6 +7,7 @@ PERLSOURCE = \ ...@@ -7,6 +7,7 @@ PERLSOURCE = \
API2Tools.pm \ API2Tools.pm \
API2Client.pm \ API2Client.pm \
ExtJSIndex.pm \ ExtJSIndex.pm \
ExtJSIndex5.pm \
TouchIndex.pm \ TouchIndex.pm \
NoVncIndex.pm \ NoVncIndex.pm \
HTTPServer.pm \ HTTPServer.pm \
......
...@@ -22,6 +22,7 @@ use PVE::API2::Formatter::HTML; ...@@ -22,6 +22,7 @@ use PVE::API2::Formatter::HTML;
use PVE::HTTPServer; use PVE::HTTPServer;
use PVE::ExtJSIndex; use PVE::ExtJSIndex;
use PVE::ExtJSIndex5;
use PVE::NoVncIndex; use PVE::NoVncIndex;
use PVE::TouchIndex; use PVE::TouchIndex;
...@@ -204,18 +205,22 @@ sub get_index { ...@@ -204,18 +205,22 @@ sub get_index {
$mobile = $args->{mobile} ? 1 : 0; $mobile = $args->{mobile} ? 1 : 0;
} }
my $ext5;
if (defined($args->{ext5})) {
$ext5 = $args->{ext5} ? 1 : 0;
}
my $page; my $page;
if (defined($args->{console}) && $args->{novnc}) { 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});
} else { } elsif ($mobile) {
if ($mobile) { $page = PVE::TouchIndex::get_index($lang, $username, $token, $args->{console});
$page = PVE::TouchIndex::get_index($lang, $username, $token, $args->{console}); } elsif ($ext5) {
$page = PVE::ExtJSIndex5::get_index($lang, $username, $token, $args->{console});
} else { } 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 $headers = HTTP::Headers->new(Content_Type => "text/html; charset=utf-8");
my $resp = HTTP::Response->new(200, "OK", $headers, $page); my $resp = HTTP::Response->new(200, "OK", $headers, $page);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment