]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/netother.cgi
Hardcode theme to ipfire
[ipfire-2.x.git] / html / cgi-bin / netother.cgi
index 52da9c8b79a072b615a0970316348e24c4c7382b..cbd2bc228853fddc539aa9e68208aeef4ae4fec3 100755 (executable)
@@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl";
 my %color = ();
 my %mainsettings = ();
 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
 
 my @pings=();
 
@@ -41,10 +41,14 @@ my @querry = split(/\?/,$ENV{'QUERY_STRING'});
 $querry[0] = '' unless defined $querry[0];
 $querry[1] = 'hour' unless defined $querry[1];
 
-if ( $querry[0] =~ "fwhits"){
+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[0],$querry[1]);
+       &Graphs::updatefwhitsgraph($querry[1]);
 }elsif ( $querry[0] ne ""){
        print "Content-type: image/png\n\n";
        binmode(STDOUT);
@@ -55,7 +59,7 @@ if ( $querry[0] =~ "fwhits"){
        &Header::openpage($Lang::tr{'network traffic graphs others'}, 1, '');
        &Header::openbigbox('100%', 'left');
        
-       my @pinggraphs = `ls -dA /var/log/rrd/collectd/localhost/ping/*`;
+       my @pinggraphs = `ls -dA /var/log/rrd/collectd/localhost/ping/ping-*`;
        foreach (@pinggraphs){
                $_ =~ /(.*)\/ping\/ping-(.*)\.rrd/;
                push(@pings,$2);
@@ -67,10 +71,36 @@ if ( $querry[0] =~ "fwhits"){
                &Header::closebox();
        }
 
-       &Header::openbox('100%', 'center', "Firewall Hits $Lang::tr{'graph'}");
+       &Header::openbox('100%', 'center', "$Lang::tr{'connection tracking'}");
+       &Graphs::makegraphbox("netother.cgi", "conntrack", "day");
+       &Header::closebox();
+
+       &Header::openbox('100%', 'center', "$Lang::tr{'firewallhits'} $Lang::tr{'graph'}");
        &Graphs::makegraphbox("netother.cgi","fwhits","day");
        &Header::closebox();
 
+       my $output = '';
+       
+       &Header::openbox('100%', 'left', $Lang::tr{'routing table entries'});
+       $output = `/sbin/ip route show`;
+       $output = &Header::cleanhtml($output,"y");
+       print "<pre>$output</pre>\n";
+       &Header::closebox();
+
+       $output = `/sbin/ip route list table 220`;
+       if ( $output ) {
+               &Header::openbox('100%', 'left', $Lang::tr{'ipsec routing table entries'});
+               $output = &Header::cleanhtml($output,"y");
+               print "<pre>$output</pre>\n";
+               &Header::closebox()
+       }
+
+       &Header::openbox('100%', 'left', $Lang::tr{'arp table entries'});
+       $output = `/sbin/ip neigh show`;
+       $output = &Header::cleanhtml($output,"y");
+       print "<pre>$output</pre>\n";
+       &Header::closebox();
+
        &Header::closebigbox();
        &Header::closepage();
 }