rrdimage: Switch graphs.pl to the new graph scripts

"makegraphbox" is modified to remove the old iframe method and output
a modern div container instead.
Graph errors are now returned, to be displayed by getrrdimage.cgi.

entropy.cgi and netovpnsrv.cgi are modified to ensure compatibility.

Add cache control HTTP header to image output.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Leo-Andres Hofmann
2021-04-01 15:35:16 +02:00
committed by Michael Tremer
parent 62206605d7
commit 9c6a0ce12d
3 changed files with 50 additions and 40 deletions

View File

@@ -45,7 +45,7 @@ if ( $querry[0] ne~ "") {
&Header::openbigbox('100%', 'left');
&Header::openbox('100%', 'center', $Lang::tr{'entropy'});
&Graphs::makegraphbox("entropy.cgi", "day");
&Graphs::makegraphbox("entropy.cgi", "entropy", "day");
&Header::closebox();
# Check for hardware support.

View File

@@ -75,7 +75,7 @@ if ( $querry[0] ne ""){
if (@vpns || %ipsecgraphs) {
foreach my $name (sort keys %ipsecgraphs) {
&Header::openbox('100%', 'center', "$Lang::tr{'ipsec connection'}: $name");
&Graphs::makegraphbox("netovpnsrv.cgi", $ipsecgraphs{$name}, "day");
&Graphs::makegraphbox("netovpnsrv.cgi", "ipsec-$ipsecgraphs{$name}", "day");
&Header::closebox();
}