[pve-devel] [PATCH pve-manager 1/3] When running with extjs=1, construct the includes lists based on manager6 dir content

Dietmar Maurer dietmar at proxmox.com
Mon Jan 25 17:38:44 CET 2016


> @@ -6,6 +9,13 @@ use warnings;
>  sub get_index {
>      my ($lang, $username, $csrftoken, $console) = @_;
>  
> +    my $manager_source_dir = '/usr/share/pve-manager/manager6/';
> +
> +#    # exit early to avoid this being run by mistake
> +    if ( ! -d $manager_source_dir) {
> +	return "$manager_source_dir not found";
> +    }
> +
>      my $page = <<_EOD;
>  <!DOCTYPE html>
>  <html>
> @@ -14,6 +24,7 @@ sub get_index {
>      <title>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>
>  _EOD
>  
>      my $langfile = "/usr/share/pve-manager/locale/pve-lang-${lang}.js";
> @@ -23,207 +34,219 @@ _EOD
>  	$page .= '<script type="text/javascript">function gettext(buf) { return buf;
> }</script>';
>      }
>  
> -    $page .= <<_EOD;
> -    <script type="text/javascript"
> src="/pve2/ext6/ext-all-debug.js"></script>

Why do you change the include ordering? AFAIK pve-lang-${lang}.js needs 
to be loaded before ext-all-debug.js?




More information about the pve-devel mailing list