]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Nochmal korrigiert und fwhits auf eine Graphenart eingestellt
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 22 May 2007 19:14:06 +0000 (19:14 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 22 May 2007 19:14:06 +0000 (19:14 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@574 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/cfgroot/graphs.pl
html/cgi-bin/fwhits.cgi
html/cgi-bin/hardwaregraphs.cgi

index f8aadc8103244c3bd441553421ce25f9f371c1ce..60951e644b698f4783183a101f14246cec12bb7b 100644 (file)
@@ -269,26 +269,6 @@ sub updatefwhitsgraph {
   "GPRINT:portamount:LAST: $tr{'current'}\\: %2.2lf %Shits/5 min");
   $ERROR = RRDs::error;
   print "Error in RRD::graph for Firewallhits: $ERROR\n" if $ERROR;
-
-  RRDs::graph ("$graphs/firewallhits-$interval-line.png",
-  "--start", "-1$interval", "-aPNG", "-i", "-z",
-  "--alt-y-grid", "-w 600", "-h 200",
-  "--color", "SHADEA".$color{"color19"},
-  "--color", "SHADEB".$color{"color19"},
-  "--color", "BACK".$color{"color21"},
-  "-t firewall hits over the last $interval",
-  "DEF:amount=$rrdlog/firewallhits.rrd:amount:AVERAGE",
-  "LINE2:amount".$color{"color24"}.":firewallhits",
-  "GPRINT:amount:MAX:   $tr{'maximal'}\\: %2.2lf %S",
-  "GPRINT:amount:AVERAGE: $tr{'average'}\\: %2.2lf %S",
-  "GPRINT:amount:LAST: $tr{'current'}\\: %2.2lf %Shits/5 min\\n",
-  "DEF:portamount=$rrdlog/firewallhits.rrd:portamount:AVERAGE",
-  "LINE2:portamount".$color{"color25"}.":portscans",
-  "GPRINT:portamount:MAX:      $tr{'maximal'}\\: %2.2lf %S",
-  "GPRINT:portamount:AVERAGE: $tr{'average'}\\: %2.2lf %S",
-  "GPRINT:portamount:LAST: $tr{'current'}\\: %2.2lf %Shits/5 min");
-  $ERROR = RRDs::error;
-  print "Error in RRD::graph for Firewallhits: $ERROR\n" if $ERROR;
 }
 
 sub updatelqgraph {
index 861befe7c122817cf6c56d198e893b0ac02fefce..e91e22b7e24379806561514834b3efbad2e9a464 100644 (file)
@@ -34,50 +34,8 @@ my @LOCALCHECK=();
 my $errormessage="";
 
 &Header::openpage($Lang::tr{'firewall graphs'}, 1, '');
-
 &Header::openbigbox('100%', 'left', '', $errormessage);
-print <<END;
-<table width="100%" align="center">
-       <tr>
-               <td align="left">
-                       <a href=/cgi-bin/fwhits.cgi?graph=line>$Lang::tr{'show lines'}</a>
-                       &nbsp;
-                       <a href=/cgi-bin/fwhits.cgi?graph=area>$Lang::tr{'show areas'}</a>
-               </td>
-       </tr>
-</table>
-END
-if ($cgigraphs[1] eq "line") {
-               &Header::openbox('100%', 'center', $Lang::tr{"daily firewallhits"});
-               my $ftime = localtime((stat("$graphdir/firewallhits-day-line.png"))[9]);
-               print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
-               print "<img alt='' src='/graphs/firewallhits-day-line.png' border='0' />";
-               print "<br />\n";
-               &Header::closebox();
-
-               &Header::openbox('100%', 'center', $Lang::tr{"weekly firewallhits"});
-               my $ftime = localtime((stat("$graphdir/firewallhits-week-line.png"))[9]);
-               print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
-               print "<img alt='' src='/graphs/firewallhits-week-line.png' border='0' />";
-               print "<br />\n";
-               &Header::closebox();
 
-               &Header::openbox('100%', 'center', $Lang::tr{"monthly firewallhits"});
-               my $ftime = localtime((stat("$graphdir/firewallhits-month-line.png"))[9]);
-               print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
-               print "<img alt='' src='/graphs/firewallhits-month-line.png' border='0' />";
-               print "<br />\n";
-               &Header::closebox();
-
-               &Header::openbox('100%', 'center', $Lang::tr{"yearly firewallhits"});
-               my $ftime = localtime((stat("$graphdir/firewallhits-year-line.png"))[9]);
-               print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
-               print "<img alt='' src='/graphs/firewallhits-year-line.png' border='0' />";
-               print "<br />\n";
-               &Header::closebox();
-}
-else
-{
                &Header::openbox('100%', 'center', $Lang::tr{"daily firewallhits"});
                my $ftime = localtime((stat("$graphdir/firewallhits-day-area.png"))[9]);
                print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
@@ -105,8 +63,6 @@ else
                print "<img alt='' src='/graphs/firewallhits-year-area.png' border='0' />";
                print "<br />\n";
                &Header::closebox();
-}
-
 
 &Header::closebigbox();
 &Header::closepage();
index 9cbaf12be2e7127617a9159ad69c1db16e0d53cb..bb3312979cf9805b31453782a141f42f9c1abc15 100644 (file)
@@ -10,8 +10,8 @@
 use strict;
 
 # enable only the following on debugging purpose
-# use warnings;
-# use CGI::Carp 'fatalsToBrowser';
+ use warnings;
+ use CGI::Carp 'fatalsToBrowser';
 
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
@@ -156,9 +156,9 @@ if ($cgigraphs[1] =~ /hddtemp/){
           foreach (@devices) {
                 my $device = $_;
                 chomp($device);
-            &Graphs::updatehddgraph ($disk,"week");
-            &Graphs::updatehddgraph ($disk,"month");
-            &Graphs::updatehddgraph ($disk,"year");}}
+            &Graphs::updatehddgraph ($device,"week");
+            &Graphs::updatehddgraph ($device,"month");
+            &Graphs::updatehddgraph ($device,"year");}}
 
   my $graph = $cgigraphs[1];
   my $graphname = $Lang::tr{"mbmon $cgigraphs[1]"};