]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Viele CGIs geaendert, einige Proxy Dateien hinzugefuegt, iptables aus dem menu geschm...
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 6 Jun 2007 17:09:21 +0000 (17:09 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 6 Jun 2007 17:09:21 +0000 (17:09 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@612 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

16 files changed:
config/menu/20-status.menu
config/proxy/auth/msnt_auth [new file with mode: 0644]
config/proxy/auth/ncsa_auth [new file with mode: 0644]
config/proxy/auth/ntlm_auth [new file with mode: 0644]
config/proxy/auth/squid_ldap_auth [new file with mode: 0644]
config/proxy/auth/squid_ldap_group [new file with mode: 0644]
config/proxy/auth/squid_radius_auth [new file with mode: 0644]
config/proxy/proxy.pac [new file with mode: 0644]
config/rootfiles/common/apache2
doc/language_issues.de
doc/language_issues.en
html/cgi-bin/proxy.cgi
html/cgi-bin/qos.cgi
html/cgi-bin/qosgraph.cgi [new file with mode: 0644]
html/cgi-bin/traffic.cgi
lfs/squid

index 37cd984af821965ebd51a19d64bc563f32c8e975..d81cefdadb2d9c4f10c2a13d3f990d2fa5998ee6 100644 (file)
@@ -60,9 +60,9 @@
                                'title' => "$Lang::tr{'sstraffic'}",
                                'enabled' => 1,
                          };
                                'title' => "$Lang::tr{'sstraffic'}",
                                'enabled' => 1,
                          };
-    $substatus->{'73.iptables'} = {
-                               'caption' => $Lang::tr{'iptable rules'},
-                               'uri' => '/cgi-bin/iptables.cgi',
-                               'title' => "$Lang::tr{'iptable rules'}",
+    $substatus->{'73.qos'} = {
+                               'caption' => $Lang::tr{'qos graphs'},
+                               'uri' => '/cgi-bin/qosgraphs.cgi',
+                               'title' => "$Lang::tr{'qos graphs'}",
                                'enabled' => 1,
                                };
                                'enabled' => 1,
                                };
diff --git a/config/proxy/auth/msnt_auth b/config/proxy/auth/msnt_auth
new file mode 100644 (file)
index 0000000..bbc56e8
Binary files /dev/null and b/config/proxy/auth/msnt_auth differ
diff --git a/config/proxy/auth/ncsa_auth b/config/proxy/auth/ncsa_auth
new file mode 100644 (file)
index 0000000..393a7c1
Binary files /dev/null and b/config/proxy/auth/ncsa_auth differ
diff --git a/config/proxy/auth/ntlm_auth b/config/proxy/auth/ntlm_auth
new file mode 100644 (file)
index 0000000..b65889c
Binary files /dev/null and b/config/proxy/auth/ntlm_auth differ
diff --git a/config/proxy/auth/squid_ldap_auth b/config/proxy/auth/squid_ldap_auth
new file mode 100644 (file)
index 0000000..93d54a5
Binary files /dev/null and b/config/proxy/auth/squid_ldap_auth differ
diff --git a/config/proxy/auth/squid_ldap_group b/config/proxy/auth/squid_ldap_group
new file mode 100644 (file)
index 0000000..23421be
Binary files /dev/null and b/config/proxy/auth/squid_ldap_group differ
diff --git a/config/proxy/auth/squid_radius_auth b/config/proxy/auth/squid_radius_auth
new file mode 100644 (file)
index 0000000..8e5f923
Binary files /dev/null and b/config/proxy/auth/squid_radius_auth differ
diff --git a/config/proxy/proxy.pac b/config/proxy/proxy.pac
new file mode 100644 (file)
index 0000000..71c47f9
--- /dev/null
@@ -0,0 +1,3 @@
+function FindProxyForURL(url, host)\r
+{\r
+}\r
index ae67f3119b926ff99f56209eb98a6662509b3fae..e43accb52f979c06635f8ca695637739a9dcd95e 100644 (file)
@@ -1311,6 +1311,7 @@ srv/web/ipfire/cgi-bin/pppsetup.cgi
 srv/web/ipfire/cgi-bin/proxy.cgi
 srv/web/ipfire/cgi-bin/proxygraphs.cgi
 srv/web/ipfire/cgi-bin/qos.cgi
 srv/web/ipfire/cgi-bin/proxy.cgi
 srv/web/ipfire/cgi-bin/proxygraphs.cgi
 srv/web/ipfire/cgi-bin/qos.cgi
+srv/web/ipfire/cgi-bin/qosgraph.cgi
 srv/web/ipfire/cgi-bin/remote.cgi
 srv/web/ipfire/cgi-bin/services.cgi
 #srv/web/ipfire/cgi-bin/shaping.cgi
 srv/web/ipfire/cgi-bin/remote.cgi
 srv/web/ipfire/cgi-bin/services.cgi
 #srv/web/ipfire/cgi-bin/shaping.cgi
index af9adb6e58140d6164bf89c1b7096762c5c29b4a..cfc26ea484223fd08b46c846f433685d59b766b5 100644 (file)
@@ -363,3 +363,4 @@ WARNING: translation string unused: written sectors
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year
 WARNING: translation string unused: yearly firewallhits
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: qos graphs
index 61e52904e740fe24029be6fd2455d4c002808936..3001d4e7f7175f834269ff82fc74f08ac410852a 100644 (file)
@@ -366,3 +366,4 @@ WARNING: translation string unused: weekly firewallhits
 WARNING: translation string unused: written sectors
 WARNING: translation string unused: year
 WARNING: translation string unused: yearly firewallhits
 WARNING: translation string unused: written sectors
 WARNING: translation string unused: year
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: qos graphs
index e582b4e5724e82aad412cdc53651c1038ac46080..e0d8452bbe94ce8117e9f2cc3c1a7cfb3b43215e 100644 (file)
@@ -2756,9 +2756,34 @@ END
 ;
                if ($proxysettings{'ENABLE'} eq 'on')
                {
 ;
                if ($proxysettings{'ENABLE'} eq 'on')
                {
+                       print FILE "if (\n";
+                       print FILE "     (isInNet(myIpAddress(), \"$netsettings{'GREEN_NETADDRESS'}\", \"$netsettings{'GREEN_NETMASK'}\"))";
+
+                       undef @templist;
+                       if (-e "$acl_src_subnets") {
+                               open(SUBNETS,"$acl_src_subnets");
+                               @templist = <SUBNETS>;
+                               close(SUBNETS);
+                       }
+
+                       foreach (@templist)
+                       {
+                               @temp = split(/\//);
+                               if (
+                                       ($temp[0] ne $netsettings{'GREEN_NETADDRESS'}) && ($temp[1] ne $netsettings{'GREEN_NETMASK'}) && 
+                                       ($temp[0] ne $netsettings{'BLUE_NETADDRESS'}) && ($temp[1] ne $netsettings{'BLUE_NETMASK'})
+                                       )
+                               {
+                                       chomp $temp[1];
+                                       print FILE " ||\n     (isInNet(myIpAddress(), \"$temp[0]\", \"$temp[1]\"))";
+                               }
+                       }
+
+                       print FILE "\n";
+
                        print FILE <<END
                        print FILE <<END
-if (
-     (isInNet(myIpAddress(), "$netsettings{'GREEN_NETADDRESS'}", "$netsettings{'GREEN_NETMASK'}"))
+
+
    )
      return "PROXY $netsettings{'GREEN_ADDRESS'}:$proxysettings{'PROXY_PORT'}";
 END
    )
      return "PROXY $netsettings{'GREEN_ADDRESS'}:$proxysettings{'PROXY_PORT'}";
 END
index 56047c8a76f10bdb4b43232133e47976c9f343a7..0dfac7898835b3fd8eac3121f4dcd48baf5b1b4b 100644 (file)
@@ -488,76 +488,6 @@ elsif ($qossettings{'ACTION'} eq 'Statusinformationen')
        &Header::closepage();
        exit
 }
        &Header::closepage();
        exit
 }
-elsif ($qossettings{'ACTION'} eq 'Grafische Auswertung')
-{
-       open( FILE, "< $classfile" ) or die "Unable to read $classfile";
-       @classes = <FILE>;
-       close FILE;
-       open( FILE, "< $subclassfile" ) or die "Unable to read $subclassfile";
-       @subclasses = <FILE>;
-       close FILE;
-       &Header::openbox('100%', 'left', 'QoS Graphen');
-       print <<END
-       <table width='100%'>    <tr><td align='center'><font color='red'>Diese Seite braucht je nach Geschwindigkeit des Computers laenger zum Laden.</font>
-                               <tr><td align='center'><b>Klasse:</b> 
-END
-;
-       foreach $classentry (sort @classes)
-       {
-               @classline = split( /\;/, $classentry );
-               $qossettings{'CLASS'}=$classline[1];
-               print <<END
-               <input type="button" onClick="swapVisibility('$qossettings{'CLASS'}')" value='$qossettings{'CLASS'}' />
-END
-;
-       }
-       print <<END
-       </table>
-END
-;
-       &Header::closebox();
-       foreach $classentry (sort @classes)
-       {
-               @classline = split( /\;/, $classentry );
-               $qossettings{'DEV'}=$classline[0];
-               $qossettings{'CLASS'}=$classline[1];
-               &gengraph($qossettings{'DEV'},$qossettings{'CLASS'});
-               print "<div id='$qossettings{'CLASS'}' style='display: none'>";
-               &Header::openbox('100%', 'center', "$qossettings{'CLASS'} ($qossettings{'DEV'})");
-               print <<END
-               <table>
-               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png' />
-               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-borrowed.png' />
-               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-bytes.png' />
-END
-;
-               foreach $subclassentry (sort @subclasses)
-               {
-                       @subclassline = split( /\;/, $subclassentry );
-                       if ($subclassline[1] eq $classline[1]) {
-                               $qossettings{'DEV'}=$subclassline[0];
-                               $qossettings{'SCLASS'}=$subclassline[2];
-                               &gengraph($qossettings{'DEV'},$qossettings{'SCLASS'});
-                               print <<END
-                               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-packets.png' />
-                               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-borrowed.png' />
-                               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-bytes.png' />
-END
-;
-                       }
-               }
-               print "\t\t</table>";
-               &Header::closebox();    
-               print "</div>\n";
-       }
-print <<END
-       </table>
-END
-;
-       &Header::closebigbox();
-       &Header::closepage();
-       exit
-}
 elsif ($qossettings{'ACTION'} eq 'Parentklasse hinzufuegen')
 {
        &parentclass();
 elsif ($qossettings{'ACTION'} eq 'Parentklasse hinzufuegen')
 {
        &parentclass();
@@ -704,9 +634,8 @@ END
                <table border='0' cellpadding='0' cellspacing='0'>
                        <tr><td><input type='submit' name='ACTION' value='Parentklasse hinzufuegen' />
                            <td><input type='submit' name='ACTION' value='Erweiterte Einstellungen' />
                <table border='0' cellpadding='0' cellspacing='0'>
                        <tr><td><input type='submit' name='ACTION' value='Parentklasse hinzufuegen' />
                            <td><input type='submit' name='ACTION' value='Erweiterte Einstellungen' />
-                       <tr><td><input type='submit' name='ACTION' value='Statusinformationen' />
-                           <td><input type='submit' name='ACTION' value='Grafische Auswertung' />
-               </table>
+                           <td><input type='submit' name='ACTION' value='Statusinformationen' />
+                       </tr></table>
        </form>
 END
 ;
        </form>
 END
 ;
@@ -728,20 +657,12 @@ if ( ($qossettings{'DEFCLASS_INC'} eq '') || ($qossettings{'DEFCLASS_OUT'} eq ''
 }
 
 &Header::openbox('100%', 'center', $Lang::tr{'info'});
 }
 
 &Header::openbox('100%', 'center', $Lang::tr{'info'});
-&overviewgraph($qossettings{'RED_DEV'});
-&overviewgraph($qossettings{'IMQ_DEV'});
 print <<END
        <table>
                <tr><td colspan='9' align='center' valign='middle'><img alt="" src='/images/addblue.gif' />&nbsp;Unterklasse hinzufuegen | <img alt="" src='/images/addgreen.gif' />&nbsp;Regel hinzufuegen | <img alt="" src='/images/edit.gif' />&nbsp;Bearbeiten | <img alt="" src='/images/delete.gif' />&nbsp;Loeschen &nbsp;
                <tr><td colspan='9' align='right' valign='middle'><b>TOS-Bits:</b>&nbsp;&nbsp;<b>0</b> - Deaktiviert | <b>8</b> - Minimale Verzoegerung | <b>4</b> - Maximaler Durchsatz | <b>2</b> - Maximale Zuverlaessigkeit | <b>1</b> - Minimale Kosten &nbsp;
 END
 ;
 print <<END
        <table>
                <tr><td colspan='9' align='center' valign='middle'><img alt="" src='/images/addblue.gif' />&nbsp;Unterklasse hinzufuegen | <img alt="" src='/images/addgreen.gif' />&nbsp;Regel hinzufuegen | <img alt="" src='/images/edit.gif' />&nbsp;Bearbeiten | <img alt="" src='/images/delete.gif' />&nbsp;Loeschen &nbsp;
                <tr><td colspan='9' align='right' valign='middle'><b>TOS-Bits:</b>&nbsp;&nbsp;<b>0</b> - Deaktiviert | <b>8</b> - Minimale Verzoegerung | <b>4</b> - Maximaler Durchsatz | <b>2</b> - Maximale Zuverlaessigkeit | <b>1</b> - Minimale Kosten &nbsp;
 END
 ;
-if (( -e "/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'RED_DEV'}.png") && ( -e "/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'IMQ_DEV'}.png")) {
-       print <<END
-               <tr><td colspan='9' align='center'><img alt="" src="/graphs/qos-graph-$qossettings{'RED_DEV'}.png" />
-               <tr><td colspan='9' align='center'><img alt="" src="/graphs/qos-graph-$qossettings{'IMQ_DEV'}.png" />
-END
-;}
 print "\t</table>";
 
 &Header::closebox();
 print "\t</table>";
 
 &Header::closebox();
@@ -1144,7 +1065,6 @@ sub showclasses {
                        @classline = split( /\;/, $classentry );
                        if ( $classline[0] eq $qossettings{'DEV'} )
                        {
                        @classline = split( /\;/, $classentry );
                        if ( $classline[0] eq $qossettings{'DEV'} )
                        {
-                               gengraph($qossettings{'DEV'},$classline[1]);
                                &Header::openbox('100%', 'center', "Klasse: $classline[1]");
                                print <<END
                                <table border='0' width='100%' cellspacing='0'>
                                &Header::openbox('100%', 'center', "Klasse: $classline[1]");
                                print <<END
                                <table border='0' width='100%' cellspacing='0'>
@@ -1348,10 +1268,6 @@ END
                                                }
                                        }
                                }
                                                }
                                        }
                                }
-
-                               if ( -e "/srv/web/ipfire/html/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png") {
-                                       print <<END
-                                       <tr><td colspan='9' align='center'><img alt="" src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png' />
 END
 ;
                                }
 END
 ;
                                }
@@ -1400,7 +1316,6 @@ END
                        }
                }
        }
                        }
                }
        }
-}
 
 sub expert
 {
 
 sub expert
 {
@@ -1500,86 +1415,3 @@ sub validsubclass {
                }
        }
 }
                }
        }
 }
-
-sub gengraph {
-       $qossettings{'DEV'} = shift;
-       $qossettings{'CLASS'} = shift;
-       my $ERROR="";
-       if ( $qossettings{'DEV'} eq $qossettings{'RED_DEV'} ) { 
-               $qossettings{'CLASSPRFX'} = '1';
-       } else { 
-               $qossettings{'CLASSPRFX'} = '2';
-       }
-       my $color=random_hex_color(6);
-
-       RRDs::graph ("/srv/web/ipfire/html/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png",
-               "--start", "-3240", "-aPNG", "-i", "-z",
-               "--alt-y-grid", "-w 600", "-h 150", "-r",
-               "--color", "SHADEA#EAE9EE",
-               "--color", "SHADEB#EAE9EE",
-               "--color", "BACK#FFFFFF",
-               "-t $qossettings{'CLASS'} ($qossettings{'DEV'})",
-               "DEF:pkts=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:pkts:AVERAGE",
-               "DEF:dropped=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:dropped:AVERAGE",
-               "DEF:overlimits=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:overlimits:AVERAGE",
-               "AREA:pkts$color:packets",
-               "GPRINT:pkts:LAST:total packets\\:%8.3lf %s packets\\j",
-               "LINE3:dropped#FF0000:dropped",
-               "GPRINT:dropped:LAST:dropped packets\\:%8.3lf %s packets\\j",
-               "LINE3:overlimits#0000FF:overlimits",
-               "GPRINT:overlimits:LAST:overlimits\\:%8.3lf %s packets\\j",
-       );
-       $ERROR = RRDs::error;
-       #print "$ERROR";
-}
-
-sub overviewgraph {
-       $qossettings{'DEV'} = shift;
-       if ( $qossettings{'DEV'} eq $qossettings{'RED_DEV'} ) { 
-               $qossettings{'CLASSPRFX'} = '1';
-       } else { 
-               $qossettings{'CLASSPRFX'} = '2';
-       }
-       my $ERROR="";
-       my $count="1";
-       my $color="#000000";
-       my @command=("/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'DEV'}.png",
-               "--start", "-3240", "-aPNG", "-i", "-z",
-               "--alt-y-grid", "-w 600", "-h 150", "-r",
-               "--color", "SHADEA#EAE9EE",
-               "--color", "SHADEB#EAE9EE",
-               "--color", "BACK#FFFFFF",
-               "-t Auslastung auf ($qossettings{'DEV'})"
-       );
-       open( FILE, "< $classfile" ) or die "Unable to read $classfile";
-       @classes = <FILE>;
-       close FILE;
-       foreach $classentry (sort @classes)
-       {
-               @classline = split( /\;/, $classentry );
-               if ( $classline[0] eq $qossettings{'DEV'} )
-               {
-                       $color=random_hex_color(6);
-                       push(@command, "DEF:$classline[1]=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$classline[1]_$qossettings{'DEV'}.rrd:bits:AVERAGE");
-
-                       if ($count eq "1") {
-                               push(@command, "AREA:$classline[1]$color:Klasse $classline[1] - $classline[8]\\j");
-                       } else {
-                               push(@command, "STACK:$classline[1]$color:Klasse $classline[1] - $classline[8]\\j");
-                       }
-                       $count++;
-               }
-       }
-       RRDs::graph (@command);
-       $ERROR = RRDs::error;
-       #print "$ERROR";
-}
-
-sub random_hex_color {
-    my $size = shift;
-    $size = 6 if $size !~ /^3|6$/;
-    my @hex = ( 0 .. 9, 'a' .. 'f' );
-    my @color;
-    push @color, @hex[rand(@hex)] for 1 .. $size;
-    return join('', '#', @color);
-}
diff --git a/html/cgi-bin/qosgraph.cgi b/html/cgi-bin/qosgraph.cgi
new file mode 100644 (file)
index 0000000..9a85014
--- /dev/null
@@ -0,0 +1,237 @@
+#!/usr/bin/perl
+#
+# SmoothWall CGIs
+#
+# This code is distributed under the terms of the GPL
+#
+# (c) The SmoothWall Team
+#
+#
+
+use strict;
+
+# enable only the following on debugging purpose
+use warnings;
+use CGI::Carp 'fatalsToBrowser';
+
+require '/var/ipfire/general-functions.pl';
+require "${General::swroot}/lang.pl";
+require "${General::swroot}/header.pl";
+require "${General::swroot}/graphs.pl";
+
+#workaround to suppress a warning when a variable is used only once
+my @dummy = ( ${Header::colourred} );
+undef (@dummy);
+
+my %qossettings = ();
+my %checked = ();
+my %netsettings = ();
+my $message = '';
+my $errormessage = "";
+my $c = "";
+my $direntry = "";
+my $classentry = "";
+my $subclassentry = "";
+my $l7ruleentry = "";
+my $portruleentry = "";
+my $tosruleentry = "";
+my @tmp = ();
+my @classes = ();
+my @subclasses = ();
+my @l7rules = ();
+my @portrules = ();
+my @tosrules = ();
+my @tmpline = ();
+my @classline = ();
+my @subclassline = ();
+my @l7ruleline = ();
+my @portruleline = ();
+my @tosruleline = ();
+my @proto = ();
+my %selected= ();
+my @checked = ();
+my $classfile = "/var/ipfire/qos/classes";
+my $subclassfile = "/var/ipfire/qos/subclasses";
+my $level7file = "/var/ipfire/qos/level7config";
+my $portfile = "/var/ipfire/qos/portconfig";
+my $tosfile = "/var/ipfire/qos/tosconfig";
+&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
+
+&overviewgraph($qossettings{'RED_DEV'});
+&overviewgraph($qossettings{'IMQ_DEV'});
+
+my %color = ();
+my %mainsettings = ();
+&General::readhash("${General::swroot}/main/settings", \%mainsettings);
+&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+
+my %cgiparams=();
+# Maps a nice printable name to the changing part of the pid file, which
+# is also the name of the program
+
+
+# Generate Graphs from rrd Data
+&Graphs::updatecpugraph ("day");
+&Graphs::updateloadgraph ("day");
+
+&Header::showhttpheaders();
+&Header::getcgihash(\%cgiparams);
+&Header::openpage($Lang::tr{'status information'}, 1, '');
+&Header::openbigbox('100%', 'left');
+
+       open( FILE, "< $classfile" ) or die "Unable to read $classfile";
+       @classes = <FILE>;
+       close FILE;
+       open( FILE, "< $subclassfile" ) or die "Unable to read $subclassfile";
+       @subclasses = <FILE>;
+       close FILE;
+       &Header::openbox('100%', 'left', 'QoS Graphen');
+       print <<END
+       <table width='100%'>    <tr><td align='center'><font color='red'>Diese Seite braucht je nach Geschwindigkeit des Computers laenger zum Laden.</font>
+                               <tr><td align='center'><b>Klasse:</b> 
+END
+;
+       foreach $classentry (sort @classes)
+       {
+               @classline = split( /\;/, $classentry );
+               $qossettings{'CLASS'}=$classline[1];
+               print <<END
+               <input type="button" onClick="swapVisibility('$qossettings{'CLASS'}')" value='$qossettings{'CLASS'}' />
+END
+;
+       }
+       print <<END
+       </table>
+END
+;
+       &Header::closebox();
+       foreach $classentry (sort @classes)
+       {
+               @classline = split( /\;/, $classentry );
+               $qossettings{'DEV'}=$classline[0];
+               $qossettings{'CLASS'}=$classline[1];
+               &gengraph($qossettings{'DEV'},$qossettings{'CLASS'});
+               print "<div id='$qossettings{'CLASS'}' style='display: none'>";
+               &Header::openbox('100%', 'center', "$qossettings{'CLASS'} ($qossettings{'DEV'})");
+               print <<END
+               <table>
+               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png' />
+               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-borrowed.png' />
+               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-bytes.png' />
+END
+;
+               foreach $subclassentry (sort @subclasses)
+               {
+                       @subclassline = split( /\;/, $subclassentry );
+                       if ($subclassline[1] eq $classline[1]) {
+                               $qossettings{'DEV'}=$subclassline[0];
+                               $qossettings{'SCLASS'}=$subclassline[2];
+                               &gengraph($qossettings{'DEV'},$qossettings{'SCLASS'});
+                               print <<END
+                               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-packets.png' />
+                               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-borrowed.png' />
+                               <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-bytes.png' />
+END
+;
+                       }
+               }
+               print "\t\t</table>";
+               &Header::closebox();    
+               print "</div>\n";
+       }
+print <<END
+       </table>
+END
+;
+
+if (( -e "/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'RED_DEV'}.png") && ( -e "/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'IMQ_DEV'}.png")) {
+       print <<END
+               <tr><td colspan='9' align='center'><img alt="" src="/graphs/qos-graph-$qossettings{'RED_DEV'}.png" />
+               <tr><td colspan='9' align='center'><img alt="" src="/graphs/qos-graph-$qossettings{'IMQ_DEV'}.png" />
+END
+;}
+
+
+&Header::closebox();
+&Header::closebigbox();
+&Header::closepage();
+
+sub gengraph {
+       $qossettings{'DEV'} = shift;
+       $qossettings{'CLASS'} = shift;
+       my $ERROR="";
+       if ( $qossettings{'DEV'} eq $qossettings{'RED_DEV'} ) { 
+               $qossettings{'CLASSPRFX'} = '1';
+       } else { 
+               $qossettings{'CLASSPRFX'} = '2';
+       }
+       my $color=random_hex_color(6);
+
+       RRDs::graph ("/srv/web/ipfire/html/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png",
+               "--start", "-3240", "-aPNG", "-i", "-z",
+               "--alt-y-grid", "-w 600", "-h 150", "-r",
+               "--color", "SHADEA#EAE9EE",
+               "--color", "SHADEB#EAE9EE",
+               "--color", "BACK#FFFFFF",
+               "-t $qossettings{'CLASS'} ($qossettings{'DEV'})",
+               "DEF:pkts=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:pkts:AVERAGE",
+               "DEF:dropped=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:dropped:AVERAGE",
+               "DEF:overlimits=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:overlimits:AVERAGE",
+               "AREA:pkts$color:packets",
+               "GPRINT:pkts:LAST:total packets\\:%8.3lf %s packets\\j",
+               "LINE3:dropped#FF0000:dropped",
+               "GPRINT:dropped:LAST:dropped packets\\:%8.3lf %s packets\\j",
+               "LINE3:overlimits#0000FF:overlimits",
+               "GPRINT:overlimits:LAST:overlimits\\:%8.3lf %s packets\\j",
+       );
+}
+
+
+sub overviewgraph {
+       $qossettings{'DEV'} = shift;
+       if ( $qossettings{'DEV'} eq $qossettings{'RED_DEV'} ) { 
+               $qossettings{'CLASSPRFX'} = '1';
+       } else { 
+               $qossettings{'CLASSPRFX'} = '2';
+       }
+       my $ERROR="";
+       my $count="1";
+       my $color="#000000";
+       my @command=("/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'DEV'}.png",
+               "--start", "-3240", "-aPNG", "-i", "-z",
+               "--alt-y-grid", "-w 600", "-h 150", "-r",
+               "--color", "SHADEA#EAE9EE",
+               "--color", "SHADEB#EAE9EE",
+               "--color", "BACK#FFFFFF",
+               "-t Auslastung auf ($qossettings{'DEV'})"
+       );
+       open( FILE, "< $classfile" ) or die "Unable to read $classfile";
+       @classes = <FILE>;
+       close FILE;
+       foreach $classentry (sort @classes)
+       {
+               @classline = split( /\;/, $classentry );
+               if ( $classline[0] eq $qossettings{'DEV'} )
+               {
+                       $color=random_hex_color(6);
+                       push(@command, "DEF:$classline[1]=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$classline[1]_$qossettings{'DEV'}.rrd:bits:AVERAGE");
+
+                       if ($count eq "1") {
+                               push(@command, "AREA:$classline[1]$color:Klasse $classline[1] - $classline[8]\\j");
+                       } else {
+                               push(@command, "STACK:$classline[1]$color:Klasse $classline[1] - $classline[8]\\j");
+                       }
+                       $count++;
+               }
+       }
+       RRDs::graph (@command);
+}
+
+sub random_hex_color {
+    my $size = shift;
+    $size = 6 if $size !~ /^3|6$/;
+    my @hex = ( 0 .. 9, 'a' .. 'f' );
+    my @color;
+    push @color, @hex[rand(@hex)] for 1 .. $size;
+    return join('', '#', @color);
+}
index ac0d2a079a5d1104f4919cf636ad120f72266288..03843913a04981e8e3952339b2604c6da84f1218 100644 (file)
@@ -131,11 +131,6 @@ print <<END;
                                <input type='submit' name='ACTION' value='$Lang::tr{'update'}' />
                        </form>
                </td>
                                <input type='submit' name='ACTION' value='$Lang::tr{'update'}' />
                        </form>
                </td>
-               <td width='5%' align='center'>
-                       <form method='post' action='/cgi-bin/trafficadm.cgi'>
-                       <input type='submit' name='ACTION' value='$Lang::tr{'net-traffic configuration'}' />
-                       </form>
-               </td>
                <td width='5%' align='center'>
                        <form method='post' action='/cgi-bin/traffics.cgi'>
                        <input type='submit' name='ACTION' value=' > ' />
                <td width='5%' align='center'>
                        <form method='post' action='/cgi-bin/traffics.cgi'>
                        <input type='submit' name='ACTION' value=' > ' />
index f545ee1ab4f7a5ef7cd8b4d2a32b1fa1e2431777..2bdf5bea82017e417355e9bb9af824c7fe5153ee 100644 (file)
--- a/lfs/squid
+++ b/lfs/squid
@@ -123,6 +123,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        chmod 775 /srv/web/ipfire/html/updatecache/download
        chmod 775 /srv/web/ipfire/html/updatecache/metadata
        chmod 755 /var/log/updatexlrator
        chmod 775 /srv/web/ipfire/html/updatecache/download
        chmod 775 /srv/web/ipfire/html/updatecache/metadata
        chmod 755 /var/log/updatexlrator
+       
+  chwon squid:squid /var/log/squid
+  mkdir /var/ipfire/proxy/advanced/auth
+       cp -f $(DIR_SRC)/config/proxy/auth /var/ipfire/proxy/advanced/auth
+       cp -f $(DIR_SRC)/config/proxy/proxy.pac /srv/web/ipfire/html/proxy.pac
+       chown nobody.nobody /srv/web/ipfire/html/proxy.pac
+       ln -f /srv/web/ipfire/html/proxy.pac /srv/web/ipfire/html//wpad.dat
 
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
 
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)