we include the version of the packages in the temlate, so that
we can tell the browser that the file has changed and thus preventing
to load an old gui js file
the index template has to add the version to the get parameter
this is the same logic we use as in PVEs pveproxy
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
$langfile = 1;
}
+ my $wtversionraw = PVE::Tools::file_read_firstline("$widgettoolkit_dir/proxmoxlib.js");
+ my $wtversion = '';
+ if ($wtversionraw =~ m|^// (.*)$|) {
+ $wtversion = $1;
+ };
+
+ my $versionraw = PVE::Tools::file_read_firstline("$gui_base_dir/js/pmgmanagerlib.js");
+ my $version = '';
+ if ($versionraw =~ m|^// (.*)$|) {
+ $version = $1;
+ };
+
+
$username = '' if !$username;
my $page = '';
console => $args->{console},
nodename => $nodename,
debug => $args->{debug} || $server->{debug},
+ version => $version,
+ wtversion => $wtversion,
};
my $template_name;