mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
rrd graphs: Remove unused individual graph output
PNG generation has been moved to getrrdimage.cgi Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
1f60759eab
commit
05c8c10f19
@@ -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;
|
||||
|
||||
@@ -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'}");
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
############################################################################################################################
|
||||
############################################################################################################################
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user