]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/log.dat
log.dat: Added entry for 'guardian'
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / log.dat
index e2d02447dce32225bbd9cd6e8d0e32e057ef444c..f954213371a56a4c02d9b9d1f91a644146f77001 100644 (file)
@@ -51,7 +51,9 @@ $cgiparams{'SECTION'} = 'ipfire';
 my %sections = (
         'ipfire' => '(ipfire: )',
         'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])',
+        'ddns' => '(ddns\[\d+\]:)',
         'dns' => '(dnsmasq\[.*\]: )',
+        'dma' => '(dma\[.*\]: )',
         'dhcp' => '(dhcpd: )',
         'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )',
         'collectd' => '(collectd\[.*\]: )',
@@ -63,18 +65,23 @@ my %sections = (
         'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )',
         'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )',
         'pakfire' => '(pakfire:) ',
-        'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:) '
+        'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:) ',
+        'squid' => '(squid\[.*\]: |squid: )',
+        'snort' => '(snort\[.*\]: )',
+        'guardian' => '(guardian\[.*\]: )'
         );
 
 # Translations for the %sections array.
 my %trsections = (
         'ipfire' => 'IPFire',
         'red' => 'RED',
+        'ddns' => "$Lang::tr{'dynamic dns'}",
         'dns' => 'DNS',
+        'dma' => 'Mail',
         'dhcp' => "$Lang::tr{'dhcp server'}",
         'cron' => 'Cron',
         'collectd' => 'Collectd',
-                               'clamav' => 'ClamAV',
+        'clamav' => 'ClamAV',
         'ntp' => 'NTP',
         'ssh' => 'SSH',
         'auth' => "$Lang::tr{'loginlogout'}",
@@ -82,7 +89,10 @@ my %trsections = (
         'ipsec' => 'IPSec',
         'openvpn' => 'OpenVPN',
         'pakfire' => 'Pakfire',
-        'wireless' => 'Wireless'
+        'wireless' => 'Wireless',
+        'squid' => "$Lang::tr{'web proxy'}",
+        'snort' => "$Lang::tr{'intrusion detection'}",
+        'guardian' => "$Lang::tr{'guardian'}"
        );
 
 
@@ -190,8 +200,10 @@ while ($gzindex >=0 && $loop) {
         # calculate file name
         if ($gzindex == 0) {
             $filestr = "/var/log/messages";
+            $filestr = "/var/log/mail" if (${section} =~ 'dma');
         } else {
             $filestr = "/var/log/messages.$gzindex";
+            $filestr = "/var/log/mail.$gzindex" if (${section} =~ 'dma');
            $filestr = "$filestr.gz" if -f "$filestr.gz";
         }
        # now read file if existing
@@ -354,11 +366,11 @@ if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; }
 if ($lines != 0) { &oldernewer(); }
 
 print <<END
-<table width='100%'>
+<table width='100%' class='tbl'>
 <tr>
-       <td width='10%' align='center' class='boldbase'><b>$Lang::tr{'time'}</b></td>
-       <td width='10%' align='center' class='boldbase'><b>$Lang::tr{'section'}</b></td>
-       <td width='80%'>&nbsp;</td>
+       <th width='10%' align='center' class='boldbase'><b>$Lang::tr{'time'}</b></th>
+       <th width='10%' align='center' class='boldbase'><b>$Lang::tr{'section'}</b></th>
+       <th width='80%'>&nbsp;</th>
 </tr>
 END
 ;
@@ -383,13 +395,15 @@ foreach $_ (@log)
            $data = substr ($data,80);  #permit correct display in table cell
            $d .=  ' ' . substr ($data,0,80);
        }
-
+       my $col="";
 
        if ($lines % 2) {
-               print "<tr bgcolor='$color{'color20'}'>"; }
+               print "<tr>";
+               $col="bgcolor='$color{'color20'}'"; }
        else {
-               print "<tr bgcolor='$color{'color22'}'>"; }
-       print "<td>$time<td>$sec<td>" .&Header::cleanhtml ("$d", 'y') . "</td></tr>\n";
+               print "<tr>";
+               $col="bgcolor='$color{'color22'}'"; }
+       print "<td $col>$time<td $col>$sec<td $col>" .&Header::cleanhtml ("$d", 'y') . "</td></tr>\n";
        $lines++;
 }
 #print '</tt>';