From 3ef99ad95a20b6cd3b99036a5f8c42dc25f763f4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 26 Nov 2012 12:18:54 +0100 Subject: [PATCH] Add links to sarg reports on the proxy reports page. --- html/cgi-bin/logs.cgi/calamaris.dat | 81 +++++++++++++++++++++++++++++ langs/de/cgi-bin/de.pl | 5 ++ langs/en/cgi-bin/en.pl | 5 ++ 3 files changed, 91 insertions(+) diff --git a/html/cgi-bin/logs.cgi/calamaris.dat b/html/cgi-bin/logs.cgi/calamaris.dat index 4ee60c21d9..07fdf8a880 100644 --- a/html/cgi-bin/logs.cgi/calamaris.dat +++ b/html/cgi-bin/logs.cgi/calamaris.dat @@ -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 + + # Today. + if (-e "$sargdir/today") { + print < + $Lang::tr{'proxy reports today'} + +END + } else { + print < + $Lang::tr{'proxy reports today'} + +END + } + + # Daily. + if (-e "$sargdir/daily") { + print < + $Lang::tr{'proxy reports daily'} + +END + } else { + print < + $Lang::tr{'proxy reports daily'} + +END + } + + # Weekly. + if (-e "$sargdir/weekly") { + print < + $Lang::tr{'proxy reports weekly'} + +END + } else { + print < + $Lang::tr{'proxy reports weekly'} + +END + } + + # Monthly. + if (-e "$sargdir/monthly") { + print < + $Lang::tr{'proxy reports monthly'} + +END + } else { + print < + $Lang::tr{'proxy reports monthly'} + +END + } + + print < + + +

+END + + &Header::closebox(); +} + + &Header::openbox('100%', 'left', "$Lang::tr{'settings'}:"); print < '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:', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 0a38750508..d1bf076d42 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1540,6 +1540,11 @@ '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:', -- 2.39.2