PNG generation has been moved to getrrdimage.cgi
Signed-off-by: Leo-Andres Hofmann <hofmann(a)leo-andres.de>
---
html/cgi-bin/entropy.cgi | 11 -----------
html/cgi-bin/hardwaregraphs.cgi | 32 --------------------------------
html/cgi-bin/media.cgi | 11 -----------
html/cgi-bin/memory.cgi | 14 --------------
html/cgi-bin/netexternal.cgi | 11 -----------
html/cgi-bin/netinternal.cgi | 17 -----------------
html/cgi-bin/netother.cgi | 19 -------------------
html/cgi-bin/netovpnrw.cgi | 10 ----------
html/cgi-bin/netovpnsrv.cgi | 14 --------------
html/cgi-bin/qos.cgi | 11 -----------
html/cgi-bin/system.cgi | 18 ------------------
11 files changed, 168 deletions(-)
diff --git a/html/cgi-bin/entropy.cgi b/html/cgi-bin/entropy.cgi
index f8045db5a..6cfcadd1c 100644
--- a/html/cgi-bin/entropy.cgi
+++ b/html/cgi-bin/entropy.cgi
@@ -30,16 +30,6 @@ require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require "${General::swroot}/graphs.pl";
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-
-if ( $querry[0] ne~ "") {
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updateentropygraph($querry[1]);
-
-} else {
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'entropy'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -86,7 +76,6 @@ EOF
&Header::closebigbox();
&Header::closepage();
-}
sub has_rdrand() {
open(FILE, "/proc/cpuinfo") or return 0;
diff --git a/html/cgi-bin/hardwaregraphs.cgi b/html/cgi-bin/hardwaregraphs.cgi
index e8f0fa362..be45a8c99 100644
--- a/html/cgi-bin/hardwaregraphs.cgi
+++ b/html/cgi-bin/hardwaregraphs.cgi
@@ -90,35 +90,6 @@ if (@thermal_zone_sensors) {
}
}
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-
-if ( $querry[0] =~ "hwtemp"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatehwtempgraph($querry[1]);
-}elsif ( $querry[0] =~ "hwfan"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatehwfangraph($querry[1]);
-}elsif ( $querry[0] =~ "hwvolt"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatehwvoltgraph($querry[1]);
-}elsif ( $querry[0] =~ "thermaltemp"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatethermaltempgraph($querry[1]);
-}elsif ( $querry[0] =~ "sd?" ){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatehddgraph($querry[0],$querry[1]);
-}elsif ( $querry[0] =~ "nvme?" ){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatehddgraph($querry[0],$querry[1]);
-}else{
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'hardware graphs'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -184,9 +155,6 @@ if ( $querry[0] =~ "hwtemp"){
&Header::closebigbox();
&Header::closepage();
-}
-
-
sub sensorsbox {
&Header::openbox('100%', 'center', "$Lang::tr{'mbmon settings'}");
diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi
index f574729ed..835565811 100644
--- a/html/cgi-bin/media.cgi
+++ b/html/cgi-bin/media.cgi
@@ -41,18 +41,8 @@ undef (@dummy);
my %cgiparams=();
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-
my @devices = `ls -1 /sys/block | grep -E '^sd|^mmcblk|^nvme|^xvd|^vd|^md' | sort | uniq`;
-if ( $querry[0] =~ "sd?" || $querry[0] =~ "mmcblk?" || $querry[0] =~ "nvme?n?" || $querry[0] =~ "xvd??" || $querry[0] =~ "vd?" || $querry[0] =~ "md*" ){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
-
- &Graphs::updatediskgraph($querry[0],$querry[1]);
-}else{
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'media information'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -162,7 +152,6 @@ END
&Header::closebigbox();
&Header::closepage();
-}
sub percentbar
{
diff --git a/html/cgi-bin/memory.cgi b/html/cgi-bin/memory.cgi
index 441b1d4e7..037d5800b 100644
--- a/html/cgi-bin/memory.cgi
+++ b/html/cgi-bin/memory.cgi
@@ -35,19 +35,6 @@ my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-
-if ( $querry[0] =~ "memory"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatememorygraph($querry[1]);
-}elsif ( $querry[0] =~ "swap"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updateswapgraph($querry[1]);
-}else{
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'memory information'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -139,7 +126,6 @@ END
&Header::closebigbox();
&Header::closepage();
-}
sub percentbar{
my $percent = $_[0];
diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi
index 1e3760c2b..704cd8727 100644
--- a/html/cgi-bin/netexternal.cgi
+++ b/html/cgi-bin/netexternal.cgi
@@ -43,16 +43,6 @@ my %netsettings=();
my @graphs=();
my %dhcpinfo=();
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-
-if ( $querry[0] ne~ ""){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updateifgraph($querry[0],$querry[1]);
-}else{
-
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'network traffic graphs external'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -163,4 +153,3 @@ END
&Header::closebigbox();
&Header::closepage();
-}
diff --git a/html/cgi-bin/netinternal.cgi b/html/cgi-bin/netinternal.cgi
index 3c2828fbf..8d7105e36 100644
--- a/html/cgi-bin/netinternal.cgi
+++ b/html/cgi-bin/netinternal.cgi
@@ -40,22 +40,6 @@ my %netsettings=();
my @graphs=();
my @wireless=();
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-$querry[2] = '' unless defined $querry[2];
-
-if ( $querry[0] =~ /wireless/ ){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- $querry[0] =~ s/wireless//g;
- &Graphs::updatewirelessgraph($querry[0],$querry[1]);
-}elsif ( $querry[0] ne "" ){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updateifgraph($querry[0],$querry[1]);
-}else{
-
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'network traffic graphs internal'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -84,4 +68,3 @@ if ( $querry[0] =~ /wireless/ ){
&Header::closebigbox();
&Header::closepage();
-}
diff --git a/html/cgi-bin/netother.cgi b/html/cgi-bin/netother.cgi
index cbd2bc228..c1d6a64a0 100755
--- a/html/cgi-bin/netother.cgi
+++ b/html/cgi-bin/netother.cgi
@@ -37,24 +37,6 @@ my %mainsettings = ();
my @pings=();
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-
-if ( $querry[0] eq "conntrack") {
- print "Content-Type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updateconntrackgraph($querry[1]);
-} elsif ( $querry[0] =~ "fwhits"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatefwhitsgraph($querry[1]);
-}elsif ( $querry[0] ne ""){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatepinggraph($querry[0],$querry[1]);
-}else{
-
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'network traffic graphs others'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -103,4 +85,3 @@ if ( $querry[0] eq "conntrack") {
&Header::closebigbox();
&Header::closepage();
-}
diff --git a/html/cgi-bin/netovpnrw.cgi b/html/cgi-bin/netovpnrw.cgi
index 00ef35337..fc2e43508 100755
--- a/html/cgi-bin/netovpnrw.cgi
+++ b/html/cgi-bin/netovpnrw.cgi
@@ -37,15 +37,6 @@ my %mainsettings = ();
my @vpns=();
-my @querry = split(/\?/,uri_unescape($ENV{'QUERY_STRING'}));
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'week' unless defined $querry[1];
-
-if ( $querry[0] ne "" && $querry[0] ne "UNDEF"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatevpngraph($querry[0],$querry[1]);
-}else{
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'vpn statistic rw'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -69,4 +60,3 @@ if ( $querry[0] ne "" && $querry[0] ne "UNDEF"){
&Header::closebigbox();
&Header::closepage();
-}
diff --git a/html/cgi-bin/netovpnsrv.cgi b/html/cgi-bin/netovpnsrv.cgi
index a53090f0f..6ff6e17fe 100755
--- a/html/cgi-bin/netovpnsrv.cgi
+++ b/html/cgi-bin/netovpnsrv.cgi
@@ -49,19 +49,6 @@ foreach my $key (sort {$vpnsettings{$a}[1] <=> $vpnsettings{$b}[1]} keys %vpnset
$ipsecgraphs{$vpnsettings{$key}[1]} = "${interface_mode}${key}";
}
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'week' unless defined $querry[1];
-
-if ( $querry[0] ne ""){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- if (grep { $_ eq $querry[0] } values %ipsecgraphs) {
- &Graphs::updateifgraph($querry[0],$querry[1]);
- } else {
- &Graphs::updatevpnn2ngraph($querry[0],$querry[1]);
- }
-}else{
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'vpn statistic n2n'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -91,4 +78,3 @@ if ( $querry[0] ne ""){
&Header::closebigbox();
&Header::closepage();
-}
diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi
index fa566b523..3410c7353 100644
--- a/html/cgi-bin/qos.cgi
+++ b/html/cgi-bin/qos.cgi
@@ -111,15 +111,6 @@ my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-
-if ( $querry[0] ne ""){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updateqosgraph($querry[0],$querry[1]);
-}else{
&Header::showhttpheaders();
&Header::openpage('QoS', 1, '');
@@ -721,8 +712,6 @@ if ( ($qossettings{'DEFCLASS_INC'} eq '') || ($qossettings{'DEFCLASS_OUT'} eq ''
&Header::closebigbox();
&Header::closepage();
-}
-
############################################################################################################################
############################################################################################################################
diff --git a/html/cgi-bin/system.cgi b/html/cgi-bin/system.cgi
index 67c479736..595ca0eab 100644
--- a/html/cgi-bin/system.cgi
+++ b/html/cgi-bin/system.cgi
@@ -35,23 +35,6 @@ my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
-my @querry = split(/\?/,$ENV{'QUERY_STRING'});
-$querry[0] = '' unless defined $querry[0];
-$querry[1] = 'hour' unless defined $querry[1];
-
-if ( $querry[0] =~ "cpufreq"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatecpufreqgraph($querry[1]);
-}elsif ( $querry[0] =~ "cpu"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updatecpugraph($querry[1]);
-}elsif ( $querry[0] =~ "load"){
- print "Content-type: image/png\n\n";
- binmode(STDOUT);
- &Graphs::updateloadgraph($querry[1]);
-}else{
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'status information'}, 1, '');
&Header::openbigbox('100%', 'left');
@@ -72,4 +55,3 @@ if ( $querry[0] =~ "cpufreq"){
&Header::closebigbox();
&Header::closepage();
-}
--
2.27.0.windows.1