mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dns/bind: add log to UI (#849)
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<menu>
|
||||
<Services>
|
||||
<BIND cssClass="fa fa-tags" url="/ui/bind/general/index" />
|
||||
<BIND cssClass="fa fa-tags">
|
||||
<Configuration url="/ui/bind/general/index" order="10"/>
|
||||
<Log VisibleName="Log File" url="/diag_logs_bind.php?type=named" order="20">
|
||||
<More url="/diag_logs_bind.php*" visibility="hidden"/>
|
||||
</Log>
|
||||
</BIND>
|
||||
</Services>
|
||||
</menu>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$type = 'named';
|
||||
if (isset($_GET['type']) && ($_GET['type'] === 'named' || $_GET['type'] === 'query' || $_GET['type'] === 'rpz')) {
|
||||
$type = $_GET['type'];
|
||||
}
|
||||
|
||||
$logfile = "/var/log/named/{$type}.log";
|
||||
$logclog = false;
|
||||
$logsplit = 5;
|
||||
|
||||
$logpills = array();
|
||||
$logpills[] = array(gettext('General'), true, '/diag_logs_bind.php?type=named');
|
||||
$logpills[] = array(gettext('Queries'), false, '/diag_logs_bind.php?type=query');
|
||||
$logpills[] = array(gettext('Blocked'), false, '/diag_logs_bind.php?type=rpz');
|
||||
|
||||
$service_hook = 'bind';
|
||||
|
||||
require_once 'diag_logs_template.inc';
|
||||
Reference in New Issue
Block a user