X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fnetwork.cgi;fp=html%2Fcgi-bin%2Fnetwork.cgi;h=b191d43e45684bc6000f5cd616fa98857cc960b9;hp=50f70a64f02f82d388ac47215b3813e0b7064ff8;hb=246c0d7155802f33c6752fbb7225eb955428a198;hpb=1dd22be219007c643fb74248f100df48a4e17572 diff --git a/html/cgi-bin/network.cgi b/html/cgi-bin/network.cgi index 50f70a64f0..b191d43e45 100644 --- a/html/cgi-bin/network.cgi +++ b/html/cgi-bin/network.cgi @@ -35,6 +35,7 @@ my %pppsettings=(); my %netsettings=(); my @cgiparams=(); my @graphs=(); +my @pings=(); my $iface=''; my %dhcpsettings=(); my %dhcpinfo=(); @@ -54,7 +55,11 @@ if ($cgiparams[1] =~ /red/) { if (-e "/var/log/rrd/collectd/localhost/interface/if_octets-ipsec0.rrd") {push (@graphs, ("ipsec0"));} }elsif ($cgiparams[1] =~ /other/) { &Header::openpage($Lang::tr{'network traffic graphs others'}, 1, ''); - push (@graphs, ("lq")); + my @pinggraphs = `ls -dA /var/log/rrd/collectd/localhost/ping/*`; + foreach (@pinggraphs){ + $_ =~ /(.*)\/ping\/ping-(.*)\.rrd/; + push(@pings,$2); + } push (@graphs, ("fwhits")); }else { &Header::openpage($Lang::tr{'network traffic graphs internal'}, 1, ''); @@ -67,11 +72,30 @@ if ($cgiparams[1] =~ /red/) { &Header::openbigbox('100%', 'left'); +foreach my $graphname (@pings) { + + if ($graphname eq "gateway" ) + { &Graphs::updatepinggraph("day","gateway"); } + else + { &Graphs::updatepinggraph("day","$graphname"); } + + &Header::openbox('100%', 'center', "$graphname $Lang::tr{'graph'}"); + if (-e "$Header::graphdir/${graphname}-day.png") { + my $ftime = localtime((stat("$Header::graphdir/${graphname}-day.png"))[9]); + print "
$Lang::tr{'the statistics were last updated at'}: $ftime

\n"; + print ""; + print ""; + print ""; + } else { + print $Lang::tr{'no information available'}; + } + print "
\n"; + &Header::closebox(); +} + foreach my $graphname (@graphs) { - if ($graphname eq "lq" ) - { &Graphs::updatelqgraph("day"); } - elsif ($graphname eq "fwhits" ) + if ($graphname eq "fwhits" ) { &Graphs::updatefwhitsgraph("day"); } else { &Graphs::updateifgraph($graphname, "day"); }