Commit 06a383ce authored by Franco Fichtner's avatar Franco Fichtner

logs: yes, this still works... #461

parent 375d4a2c
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/system.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
$system_logfile = '/var/log/system.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if (isset($_POST['clear'])) {
clear_clog($system_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($system_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs.php" method="post">
<input name="clear" type="submit" class="btn btn-default" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/portalauth.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$portal_logfile = '/var/log/portalauth.log';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($portal_logfile);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext('Last %s Portal Auth log entries'), $nentries); ?></strong></td></tr>
<?php dump_clog($portal_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_auth.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/dhcpd.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$dhcpd_logfile = '/var/log/dhcpd.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($dhcpd_logfile);
killbyname("dhcpd");
function clear_hook()
{
killbyname('dhcpd');
services_dhcpd_configure();
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
$shortcut_section = "dhcp";
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_dhcp.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($dhcpd_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs_dhcp.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td><tr>
<tr><td colspan="2"><?=gettext('NOTE: Clearing the log file will restart the DHCP daemon.') ?></td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
require_once 'services.inc';
$shortcut_section = 'dhcp';
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/ipsec.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("vpn.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$ipsec_logfile = '/var/log/ipsec.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ipsec_logfile);
}
$shortcut_section = 'ipsec';
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext("Last %s IPsec log entries"),$nentries);?></strong></td></tr>
<?php dump_clog($ipsec_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_ipsec.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/ntpd.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
require_once 'services.inc';
$shortcut_section = 'ntp';
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$ntpd_logfile = '/var/log/ntpd.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ntpd_logfile);
}
$shortcut_section = "ntp";
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext("Last %s NTP log entries"), $nentries);?></strong></td></tr>
<?php dump_clog($ntpd_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_ntpd.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
<tr></td>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/openvpn.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("vpn.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$openvpn_logfile = '/var/log/openvpn.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($openvpn_logfile);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext("Last %s OpenVPN log entries"),$nentries)?></strong></td></tr>
<?php dump_clog($openvpn_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_openvpn.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
$tab_group = isset($tab_group) ? $tab_group : 'system';
$tab_array = array();
if ($tab_group == 'vpn') {
$tab_array[] = array(gettext("PPTP Logins"), (($vpntype == "pptp") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=pptp");
$tab_array[] = array(gettext("PPTP Raw"), (($vpntype == "pptp") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=pptp&amp;mode=raw");
$tab_array[] = array(gettext("PPPoE Logins"), (($vpntype == "poes") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=poes");
$tab_array[] = array(gettext("PPPoE Raw"), (($vpntype == "poes") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=poes&amp;mode=raw");
$tab_array[] = array(gettext("L2TP Logins"), (($vpntype == "l2tp") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=l2tp");
$tab_array[] = array(gettext("L2TP Raw"), (($vpntype == "l2tp") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=l2tp&amp;mode=raw");
} else {
$tab_array[] = array(gettext('Cache'), true, '/diag_logs_proxy.php?type=cache');
$tab_array[] = array(gettext('Access'), false, '/diag_logs_proxy.php?type=access');
$tab_array[] = array(gettext('Store'), false, '/diag_logs_proxy.php?type=store');
}
?><ul class="nav nav-pills" role="tablist">
<?php foreach ($tab_array as $tab): ?>
<li role="presentation" <?php if (str_replace('amp;','', $tab[2]) == $_SERVER['REQUEST_URI']):?>class="active"<?php endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
<?php endforeach; ?>
</ul>
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/ppps.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
$ppps_logfile = '/var/log/ppps.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ppps_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_ppp.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($ppps_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs_ppp.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2015 Deciso B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("system.inc");
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
$type = 'cache';
if (isset($_GET['type']) && ($_GET['type'] === 'access' || $_GET['type'] === 'store')) {
$type = $_GET['type'];
}
$logfile = "/var/log/squid/{$type}.log";
$logclog = false;
if (isset($_GET['clear'])) {
clear_log($logfile);
}
include("head.inc");
?>
$logpills = array();
$logpills[] = array(gettext('Cache'), true, '/diag_logs_proxy.php?type=cache');
$logpills[] = array(gettext('Access'), false, '/diag_logs_proxy.php?type=access');
$logpills[] = array(gettext('Store'), false, '/diag_logs_proxy.php?type=store');
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><?php $tab_group = 'proxy'; include('diag_logs_pills.inc'); ?></td></tr>
<tr><td colspan="2"><strong><?= sprintf(gettext("Last %s Proxy log entries"), $nentries);?></strong></td></tr>
<?php dump_log($logfile, $nentries); ?>
<tr><td colspan="2">
<form method="get">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
<input name="type" type="hidden" value="<?= $type ?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
require_once 'services.inc';
$shortcut_section = 'squid';
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
Copyright (C) 2008 Seth Mos <seth.mos@dds.nl>.
All rights reserved.
$logfile = '/var/log/relayd.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$relayd_logfile = '/var/log/relayd.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($relayd_logfile);
}
$shortcut_section = 'relayd';
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext('Last %s Load Balancer log entries'), $nentries);?></strong></td></tr>
<?php dump_clog($relayd_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_relayd.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2012 Seth Mos
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/resolver.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$system_logfile = '/var/log/resolver.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($system_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_resolver.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($system_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs_resolver.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2012 Jim Pingle <jimp@pfsense.org>.
All rights reserved.
$logfile = '/var/log/routing.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
$routing_logfile = '/var/log/routing.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if (!empty($_POST['clear'])) {
clear_clog($routing_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_routing.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td>
</tr>
<?php dump_clog($routing_logfile, $nentries, $filtertext); ?>
<tr>
<td colspan="2">
<form action="diag_logs_routing.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td>
</tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
......@@ -49,6 +49,9 @@ if (!empty($_POST['clear'])) {
} else {
clear_log($logfile);
}
if (function_exists(clear_hook)) {
clear_hook();
}
}
if (isset($_POST['filtertext'])) {
......@@ -68,9 +71,20 @@ include("head.inc");
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php if (isset($logpills)): ?>
<tr>
<td colspan="2">
<ul class="nav nav-pills" role="tablist">
<?php foreach ($logpills as $pill): ?>
<li role="presentation" <?php if (str_replace('amp;','', $pill[2]) == $_SERVER['REQUEST_URI']):?>class="active"<?php endif; ?>><a href="<?=$pill[2];?>"><?=$pill[0];?></a></li>
<?php endforeach; ?>
</ul>
</td>
</tr>
<?php endif; ?>
<tr>
<td colspan="2">
<form id="clearform" name="clearform" action="<? $_SERVER['REQUEST_URI'] ?>" method="post" class="__mt">
<form id="clearform" name="clearform" action="<? $_SERVER['REQUEST_URI'] ?>" method="post">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
......
......@@ -32,6 +32,14 @@ require_once("vpn.inc");
require_once("system.inc");
require_once("interfaces.inc");
$tab_array = array();
$tab_array[] = array(gettext("PPTP Logins"), (($vpntype == "pptp") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=pptp");
$tab_array[] = array(gettext("PPTP Raw"), (($vpntype == "pptp") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=pptp&amp;mode=raw");
$tab_array[] = array(gettext("PPPoE Logins"), (($vpntype == "poes") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=poes");
$tab_array[] = array(gettext("PPPoE Raw"), (($vpntype == "poes") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=poes&amp;mode=raw");
$tab_array[] = array(gettext("L2TP Logins"), (($vpntype == "l2tp") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=l2tp");
$tab_array[] = array(gettext("L2TP Raw"), (($vpntype == "l2tp") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=l2tp&amp;mode=raw");
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
......@@ -123,7 +131,13 @@ include("head.inc");
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="4"><?php $tab_group = 'vpn'; include('diag_logs_pills.inc'); ?></td></tr>
<tr><td colspan="4">
<ul class="nav nav-pills" role="tablist">
<?php foreach ($tab_array as $tab): ?>
<li role="presentation" <?php if (str_replace('amp;','', $tab[2]) == $_SERVER['REQUEST_URI']):?>class="active"<?php endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
<?php endforeach; ?>
</ul>
</td></tr>
<?php if ($mode != "raw"): ?>
<tr>
<td class="listhdrr"><?=gettext("Time");?></td>
......
<?php
/*
Copyright (C) Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
Copyright (C) 2008 Seth Mos <seth.mos@dds.nl>.
Copyright (C) 2011 Jim Pingle <jimp@pfsense.org>.
All rights reserved.
$logfile = '/var/log/wireless.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
$wireless_logfile = '/var/log/wireless.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($wireless_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_wireless.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($wireless_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs_wireless.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment