]> git.ipfire.org Git - people/ummeegge/ipfire-2.x.git/commitdiff
Add links to sarg reports on the proxy reports page.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 26 Nov 2012 11:18:54 +0000 (12:18 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 26 Nov 2012 11:18:54 +0000 (12:18 +0100)
html/cgi-bin/logs.cgi/calamaris.dat
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 4ee60c21d9ad812fa741e7a46093bef4f45350c5..07fdf8a880d0119b6ce0eaaaa8221d73a82c1222 100644 (file)
@@ -24,6 +24,7 @@ my $unique=time;
 
 my $squidlogdir = "/var/log/squid";
 my $reportdir = "${General::swroot}/proxy/calamaris/reports";
+my $sargdir = "/var/log/sarg";
 
 unless (-e $reportdir) { mkdir($reportdir) }
 
@@ -241,6 +242,86 @@ if ($errormessage) {
        &Header::closebox();
 }
 
+# Link sarg reports.
+if (-e $sargdir) {
+       &Header::openbox('100%', 'left', "$Lang::tr{'proxy reports'}:");
+
+       print <<END;
+               <table width="100%">
+                       <tr>
+END
+
+       # Today.
+       if (-e "$sargdir/today") {
+               print <<END;
+                       <td width="25%" align="center">
+                               <a href="/proxy-reports/today" target="_blank">$Lang::tr{'proxy reports today'}</a>
+                       </td>
+END
+       } else {
+               print <<END;
+                       <td width="25%" align="center">
+                               $Lang::tr{'proxy reports today'}
+                       </td>
+END
+       }
+
+       # Daily.
+       if (-e "$sargdir/daily") {
+               print <<END;
+                       <td width="25%" align="center">
+                               <a href="/proxy-reports/daily" target="_blank">$Lang::tr{'proxy reports daily'}</a>
+                       </td>
+END
+       } else {
+               print <<END;
+                       <td width="25%" align="center">
+                               $Lang::tr{'proxy reports daily'}
+                       </td>
+END
+       }
+
+       # Weekly.
+       if (-e "$sargdir/weekly") {
+               print <<END;
+                       <td width="25%" align="center">
+                               <a href="/proxy-reports/weekly" target="_blank">$Lang::tr{'proxy reports weekly'}</a>
+                       </td>
+END
+       } else {
+               print <<END;
+                       <td width="25%" align="center">
+                               $Lang::tr{'proxy reports weekly'}
+                       </td>
+END
+       }
+
+       # Monthly.
+       if (-e "$sargdir/monthly") {
+               print <<END;
+                       <td width="25%" align="center">
+                               <a href="/proxy-reports/monthly" target="_blank">$Lang::tr{'proxy reports monthly'}</a>
+                       </td>
+END
+       } else {
+               print <<END;
+                       <td width="25%" align="center">
+                               $Lang::tr{'proxy reports monthly'}
+                       </td>
+END
+       }
+
+       print <<END;
+                       </tr>
+               </table>
+
+               <br><br>
+END
+
+       &Header::closebox();
+}
+
+
 &Header::openbox('100%', 'left', "$Lang::tr{'settings'}:");
 
 print <<END
index 1c32fb628346b520e301a707e626a521c8036ea2..1ae6f5d77c0931e3f048a2aea388a16e2d8641d1 100644 (file)
 'proxy no proxy local' => 'Lokalen Proxy auf blauen/grünen Netzwerken verhindern',
 'proxy port' => 'Proxy-Port',
 'proxy reconfigure' => 'Speichern und Laden',
+'proxy reports' => 'Proxyberichte',
+'proxy reports daily' => 'Tägliche Berichte',
+'proxy reports monthly' => 'Monatliche Berichte',
+'proxy reports today' => 'Heute',
+'proxy reports weekly' => 'Wöchentliche Berichte',
 'psk' => 'PSK',
 'pulse' => 'Puls',
 'pulse dial' => 'Pulswahl:',
index 0a387505082cdeb2d5caaaf5a137602a25366c0a..d1bf076d426bb8fd697e4279b844529af0c33ec9 100644 (file)
 'proxy no proxy local' => 'Disallow local proxying on BLUE/GREEN networks',
 'proxy port' => 'Proxy Port',
 'proxy reconfigure' => 'Save and Reload',
+'proxy reports' => 'Proxy Reports',
+'proxy reports daily' => 'Daily reports',
+'proxy reports monthly' => 'Monthly reports',
+'proxy reports today' => 'Today',
+'proxy reports weekly' => 'Weekly reports',
 'psk' => 'PSK',
 'pulse' => 'Pulse',
 'pulse dial' => 'Pulse dial:',