Commit 4032bc53 authored by Franco Fichtner's avatar Franco Fichtner

logs: move last entries away from status section

parent fba56a9a
......@@ -51,6 +51,11 @@
<Routing url="/diag_logs_routing.php"/>
<Resolver url="/diag_logs_resolver.php"/>
<Wireless url="/diag_logs_wireless.php"/>
<DHCP url="/diag_logs_dhcp.php"/>
<PPP url="/diag_logs_ppp.php"/>
<VPN url="/diag_logs_vpn.php?vpntype=pptp">
<Type url="/diag_logs_vpn.php*"/>
</VPN>
</LogFiles>
<Settings cssClass="fa fa-cogs">
<General url="/system_general.php"/>
......@@ -311,13 +316,6 @@
<DHCPv6Leases VisibleName="DHCP IPv6 Leases" url="/status_dhcpv6_leases.php">
<DHCPv6LeasesDetails url="/status_dhcpv6_leases.php?*"/>
</DHCPv6Leases>
<LogFiles VisibleName="Log Files" cssClass="fa fa-eye">
<DHCP url="/diag_logs_dhcp.php"/>
<PPP url="/diag_logs_ppp.php"/>
<VPN url="/diag_logs_vpn.php?vpntype=pptp">
<Type url="/diag_logs_vpn.php*"/>
</VPN>
</LogFiles>
</Status>
<Help order="8" cssClass="glyphicon glyphicon-question-sign">
<AboutThisPage VisibleName="About this Page" url="/help.php" IsExternal="Y"/>
......
......@@ -34,6 +34,7 @@ require_once("system.inc");
require_once("interfaces.inc");
$dhcpd_logfile = '/var/log/dhcpd.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
......@@ -46,6 +47,10 @@ if ($_POST['clear']) {
services_dhcpd_configure();
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("DHCP"));
$shortcut_section = "dhcp";
include("head.inc");
......@@ -66,8 +71,13 @@ include("head.inc");
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><?= sprintf(gettext('Last %s DHCP service log entries'), $nentries); ?></strong></td><tr>
<?php dump_clog($dhcpd_logfile, $nentries); ?>
<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");?>" />
......
......@@ -33,10 +33,10 @@ require_once("system.inc");
require_once("interfaces.inc");
$ppps_logfile = '/var/log/ppps.log';
$filtertext = '';
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
......@@ -44,6 +44,10 @@ if ($_POST['clear']) {
clear_clog($ppps_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("PPP"));
include("head.inc");
......@@ -64,8 +68,13 @@ include("head.inc");
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><?= sprintf(gettext("Last %s PPP log entries"),$nentries);?></strong></td></tr>
<?php dump_clog($ppps_logfile, $nentries); ?>
<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");?>" />
......
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