mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Add links to sarg reports on the proxy reports page.
This commit is contained in:
@@ -24,6 +24,7 @@ my $unique=time;
|
|||||||
|
|
||||||
my $squidlogdir = "/var/log/squid";
|
my $squidlogdir = "/var/log/squid";
|
||||||
my $reportdir = "${General::swroot}/proxy/calamaris/reports";
|
my $reportdir = "${General::swroot}/proxy/calamaris/reports";
|
||||||
|
my $sargdir = "/var/log/sarg";
|
||||||
|
|
||||||
unless (-e $reportdir) { mkdir($reportdir) }
|
unless (-e $reportdir) { mkdir($reportdir) }
|
||||||
|
|
||||||
@@ -241,6 +242,86 @@ if ($errormessage) {
|
|||||||
&Header::closebox();
|
&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'}:");
|
&Header::openbox('100%', 'left', "$Lang::tr{'settings'}:");
|
||||||
|
|
||||||
print <<END
|
print <<END
|
||||||
|
|||||||
@@ -1513,6 +1513,11 @@
|
|||||||
'proxy no proxy local' => 'Lokalen Proxy auf blauen/grünen Netzwerken verhindern',
|
'proxy no proxy local' => 'Lokalen Proxy auf blauen/grünen Netzwerken verhindern',
|
||||||
'proxy port' => 'Proxy-Port',
|
'proxy port' => 'Proxy-Port',
|
||||||
'proxy reconfigure' => 'Speichern und Laden',
|
'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',
|
'psk' => 'PSK',
|
||||||
'pulse' => 'Puls',
|
'pulse' => 'Puls',
|
||||||
'pulse dial' => 'Pulswahl:',
|
'pulse dial' => 'Pulswahl:',
|
||||||
|
|||||||
@@ -1540,6 +1540,11 @@
|
|||||||
'proxy no proxy local' => 'Disallow local proxying on BLUE/GREEN networks',
|
'proxy no proxy local' => 'Disallow local proxying on BLUE/GREEN networks',
|
||||||
'proxy port' => 'Proxy Port',
|
'proxy port' => 'Proxy Port',
|
||||||
'proxy reconfigure' => 'Save and Reload',
|
'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',
|
'psk' => 'PSK',
|
||||||
'pulse' => 'Pulse',
|
'pulse' => 'Pulse',
|
||||||
'pulse dial' => 'Pulse dial:',
|
'pulse dial' => 'Pulse dial:',
|
||||||
|
|||||||
Reference in New Issue
Block a user