mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
logs: tab conversion
Shuffled three of them back to status for the last round of fire bombing before 15.7.17. This is not going to be in the stable version, but I want to have this ready for development version feedback. This is so much nicer without the tick wrapping of tabs and pills and what not...
This commit is contained in:
parent
0528a90aaf
commit
36fea88a19
@ -1,7 +1,7 @@
|
||||
<menu>
|
||||
<User order="0" cssClass="glyphicon glyphicon-user">
|
||||
<ChangePassword VisibleName="Change password" url="/system_usermanager_passwordmg.php" cssClass="fa fa-key"/>
|
||||
<Logout VisibleName="Logout" url="/index.php?logout" cssClass="fa fa-sign-out"/>
|
||||
<Logout url="/index.php?logout" cssClass="fa fa-sign-out"/>
|
||||
</User>
|
||||
<System order="1" VisibleName="System" cssClass="glyphicon glyphicon-dashboard">
|
||||
<CertificateManager VisibleName="Certificate Manager" cssClass="fa fa-certificate">
|
||||
@ -45,20 +45,12 @@
|
||||
<Groups url="/status_gateway_groups.php"/>
|
||||
</Status>
|
||||
</Gateways>
|
||||
<LogFiles VisibleName="Log Files" url="/diag_logs.php" cssClass="fa fa-eye">
|
||||
<System url="/diag_logs.php">
|
||||
<Gateways url="/diag_logs_gateways.php"/>
|
||||
<Routing url="/diag_logs_routing.php"/>
|
||||
<Resolver url="/diag_logs_resolver.php"/>
|
||||
<Wireless url="/diag_logs_wireless.php"/>
|
||||
</System>
|
||||
<Firewall url="/diag_logs_filter.php">
|
||||
<DynamicView url="/diag_logs_filter_dynamic.php"/>
|
||||
<SummaryView url="/diag_logs_filter_summary.php"/>
|
||||
</Firewall>
|
||||
<DHCP url="/diag_logs_dhcp.php"/>
|
||||
<PPP url="/diag_logs_ppp.php"/>
|
||||
<VPN url="/diag_logs_vpn.php*"/>
|
||||
<LogFiles VisibleName="Log Files" cssClass="fa fa-eye">
|
||||
<General url="/diag_logs.php"/>
|
||||
<Gateways url="/diag_logs_gateways.php"/>
|
||||
<Routing url="/diag_logs_routing.php"/>
|
||||
<Resolver url="/diag_logs_resolver.php"/>
|
||||
<Wireless url="/diag_logs_wireless.php"/>
|
||||
</LogFiles>
|
||||
<Settings cssClass="fa fa-cogs">
|
||||
<General url="/system_general.php"/>
|
||||
@ -141,6 +133,11 @@
|
||||
<URLs order="400" url="/firewall_aliases.php?tab=url"/>
|
||||
<Import order="500" url="/firewall_aliases_import.php"/>
|
||||
</Aliases>
|
||||
<LogFiles VisibleName="Log Files" cssClass="fa fa-eye">
|
||||
<Normal VisibleName="Normal View" order="100" url="/diag_logs_filter.php"/>
|
||||
<Dynamic VisibleName="Dynamic View" order="200" url="/diag_logs_filter_dynamic.php"/>
|
||||
<Summary VisibleName="Summary View" order="300" url="/diag_logs_filter_summary.php"/>
|
||||
</LogFiles>
|
||||
<NAT cssClass="fa fa-exchange">
|
||||
<PortForward order="100" VisibleName="Port Forward" url="/firewall_nat.php">
|
||||
<NatEdit url="/firewall_nat_edit.php*"/>
|
||||
@ -316,6 +313,13 @@
|
||||
<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"/>
|
||||
|
||||
@ -44,19 +44,11 @@ if (isset($_POST['clear'])) {
|
||||
clear_clog($system_logfile);
|
||||
}
|
||||
|
||||
if ($_GET['filtertext']) {
|
||||
$filtertext = htmlspecialchars($_GET['filtertext']);
|
||||
}
|
||||
|
||||
if ($_POST['filtertext']) {
|
||||
if (isset($_POST['filtertext'])) {
|
||||
$filtertext = htmlspecialchars($_POST['filtertext']);
|
||||
}
|
||||
|
||||
if ($filtertext) {
|
||||
$filtertextmeta = "?filtertext={$filtertext}";
|
||||
}
|
||||
|
||||
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("General"));
|
||||
$pgtitle = array(gettext('System'), gettext('Log Files'), gettext('General'));
|
||||
include("head.inc");
|
||||
|
||||
?>
|
||||
@ -73,39 +65,31 @@ include("head.inc");
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<? include('diag_logs_pills.inc'); ?>
|
||||
</div>
|
||||
|
||||
<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
|
||||
if ($filtertext) {
|
||||
if (isset($filtertext)) {
|
||||
dump_clog($system_logfile, $nentries, true, array("$filtertext"), array("ppp"));
|
||||
} else {
|
||||
dump_clog($system_logfile, $nentries, true, array(), array("ppp"));
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -64,27 +64,19 @@ include("head.inc");
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
<? include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
<?php printf(gettext('Last %s DHCP service log entries'), $nentries); ?>
|
||||
</div>
|
||||
<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, true); ?>
|
||||
<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">NOTE: Clearing the log file will restart the DHCP daemon.</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="diag_logs_dhcp.php" method="post">
|
||||
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
|
||||
</form>
|
||||
<p>NOTE: Clearing the log file will restart the DHCP daemon.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -590,7 +590,7 @@ if (isset($_POST['clear'])) {
|
||||
clear_clog($filter_logfile);
|
||||
}
|
||||
|
||||
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Firewall"));
|
||||
$pgtitle = array(gettext('Firewall'), gettext('Log Files'), gettext('Normal View'));
|
||||
$shortcut_section = "firewall";
|
||||
include("head.inc");
|
||||
|
||||
@ -609,15 +609,7 @@ include("head.inc");
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<? $tab_group = 'firewall'; include('diag_logs_pills.inc'); ?>
|
||||
|
||||
<form id="filterlogentries" name="filterlogentries" action="diag_logs_filter.php" method="post">
|
||||
<?php
|
||||
$Include_Act = explode(",", str_replace(" ", ",", $filterfieldsarray['act']));
|
||||
@ -671,21 +663,25 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td></td><td></td><td></td><td></td>
|
||||
<td><input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" style="vertical-align:top;" value="<?=gettext("Filter");?>" /></td>
|
||||
<td colspan="6">
|
||||
<span class="vexpl"><a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">TCP Flags</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" style="vertical-align:top;" value="<?=gettext("Filter");?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
@ -703,11 +699,12 @@ include("head.inc");
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="<?=isset($config['syslog']['filterdescriptions']) && $config['syslog']['filterdescriptions']==="1"?7:6?>" class="listtopic">
|
||||
<strong>
|
||||
<?php if ( (!$filtertext) && (!$filterfieldsarray) )
|
||||
printf(gettext("Last %s firewall log entries."),count($filterlog));
|
||||
else
|
||||
echo count($filterlog). ' ' . gettext("matched log entries.");
|
||||
printf(gettext("Max(%s)"),$nentries);?>
|
||||
echo sprintf(gettext('Showing %s matching log entries (maximum is %s).'), count($filterlog), $nentries);?>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="sortableHeaderRowIdentifier">
|
||||
@ -810,7 +807,7 @@ include("head.inc");
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="2" class="listtopic">
|
||||
<?php printf(gettext("Last %s firewall log entries"),$nentries);?></td>
|
||||
<strong><?php printf(gettext("Last %s firewall log entries"),$nentries);?></strong></td>
|
||||
</tr>
|
||||
<?php
|
||||
if($filtertext)
|
||||
@ -818,6 +815,11 @@ include("head.inc");
|
||||
else
|
||||
dump_clog($filter_logfile, $nentries);
|
||||
?>
|
||||
<tr><td colspan="2">
|
||||
<form id="clearform" name="clearform" action="diag_logs_filter.php" method="post" style="margin-top: 14px;">
|
||||
<input id="submit" name="clear" type="submit" class="btn btn-primary" value="<?=gettext("Clear log");?>" />
|
||||
</form>
|
||||
</td></tr>
|
||||
<?php endif; ?>
|
||||
|
||||
</table>
|
||||
@ -825,16 +827,6 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<form id="clearform" name="clearform" action="diag_logs_filter.php" method="post" style="margin-top: 14px;">
|
||||
<input id="submit" name="clear" type="submit" class="btn btn-primary" value="<?=gettext("Clear log");?>" />
|
||||
</form>
|
||||
|
||||
<p><span class="vexpl"><a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">TCP Flags</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR</span></p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -47,7 +47,7 @@ if (isset($_POST['clear'])) {
|
||||
|
||||
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100);
|
||||
|
||||
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Firewall (Dynamic View)"));
|
||||
$pgtitle = array(gettext('Firewall'), gettext('Log Files'), gettext('Dynamic View'));
|
||||
$shortcut_section = "firewall";
|
||||
include("head.inc");
|
||||
|
||||
@ -91,22 +91,19 @@ include("head.inc");
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<? $tab_group = 'firewall'; include('diag_logs_pills.inc'); ?>
|
||||
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="6" class="listtopic">
|
||||
<?php printf(gettext("Last %s records"),$nentries);?>. <input type="checkbox" onclick="javascript:toggle_pause();" /> <?=gettext("Pause");?>
|
||||
<strong><?php printf(gettext("Showing last %s records."),$nentries);?></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="listtopic">
|
||||
<input type="checkbox" onclick="javascript:toggle_pause();" /> <?=gettext("Pause");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -156,9 +153,6 @@ include("head.inc");
|
||||
<tr style="display:none;"><td></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p><span class="vexpl"><a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol"><?=gettext("TCP Flags"); ?></a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR</span></p></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -27,8 +27,9 @@
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
$pgtitle = gettext("Status").": ".gettext("System logs").": ".gettext("Firewall Log Summary");
|
||||
$pgtitle = array(gettext('Firewall'), gettext('Log Files'), gettext('Summary View'));
|
||||
$shortcut_section = "firewall";
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("filter_log.inc");
|
||||
require_once("interfaces.inc");
|
||||
@ -115,11 +116,14 @@ include("head.inc"); ?>
|
||||
<div class="row">
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
<section class="col-xs-12">
|
||||
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.inc'); ?>
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
<? $tab_group = 'firewall'; include('diag_logs_pills.inc'); ?>
|
||||
<p><?php printf (gettext('This is a firewall log summary, of the last %1$s lines of the firewall log (Max %2$s).'), $gotlines, $lines)?><br /></p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?= sprintf(gettext('The following summaries have been collected from the last %s lines of the firewall log (maximum is %s).'), $gotlines, $lines)?></strong>
|
||||
</tr></td>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -46,19 +46,11 @@ if ($_POST['clear']) {
|
||||
clear_clog($system_logfile);
|
||||
}
|
||||
|
||||
if ($_GET['filtertext']) {
|
||||
$filtertext = htmlspecialchars($_GET['filtertext']);
|
||||
}
|
||||
|
||||
if ($_POST['filtertext']) {
|
||||
if (isset($_POST['filtertext'])) {
|
||||
$filtertext = htmlspecialchars($_POST['filtertext']);
|
||||
}
|
||||
|
||||
if ($filtertext) {
|
||||
$filtertextmeta = "?filtertext={$filtertext}";
|
||||
}
|
||||
|
||||
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Gateways"));
|
||||
$pgtitle = array(gettext('System'), gettext('Log Files'), gettext('Gateways'));
|
||||
$shortcut_section = "gateways";
|
||||
include("head.inc");
|
||||
|
||||
@ -75,38 +67,30 @@ include("head.inc");
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<? include('diag_logs_pills.inc'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr><td colspan="2">
|
||||
<form id="clearform" name="clearform" action="diag_logs_gateways.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
|
||||
if($filtertext)
|
||||
if (isset($filtertext))
|
||||
dump_clog($system_logfile, $nentries, true, array("$filtertext"));
|
||||
else
|
||||
dump_clog($system_logfile, $nentries, true, array());
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<tr><td colspan="2">
|
||||
<form action="diag_logs_gateways.php" method="post">
|
||||
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
|
||||
</form>
|
||||
<form id="clearform" name="clearform" action="diag_logs_gateways.php" method="post" class="__mt">
|
||||
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" type="text" class="pull-left __mr"/>
|
||||
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
|
||||
</form>
|
||||
</div>
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -36,19 +36,9 @@ if ($tab_group == 'vpn') {
|
||||
$tab_array[] = array(gettext("PPPoE Raw"), (($vpntype == "poes") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=poes&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&mode=raw");
|
||||
} elseif ($tab_group == 'firewall') {
|
||||
$tab_array[] = array(gettext("Normal View"), true, "/diag_logs_filter.php");
|
||||
$tab_array[] = array(gettext("Dynamic View"), false, "/diag_logs_filter_dynamic.php");
|
||||
$tab_array[] = array(gettext("Summary View"), false, "/diag_logs_filter_summary.php");
|
||||
} elseif ($tab_group == 'proxy') {
|
||||
} 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');
|
||||
} else {
|
||||
$tab_array[] = array(gettext("General"), true, "/diag_logs.php");
|
||||
$tab_array[] = array(gettext("Gateways"), false, "/diag_logs_gateways.php");
|
||||
$tab_array[] = array(gettext("Routing"), false, "/diag_logs_routing.php");
|
||||
$tab_array[] = array(gettext("Resolver"), false, "/diag_logs_resolver.php");
|
||||
$tab_array[] = array(gettext("Wireless"), false, "/diag_logs_wireless.php");
|
||||
}
|
||||
|
||||
?><ul class="nav nav-pills" role="tablist">
|
||||
|
||||
@ -60,27 +60,21 @@ include("head.inc");
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
<? include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
<p> <?php printf(gettext("Last %s PPP log entries"),$nentries);?></p>
|
||||
|
||||
<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 action="diag_logs_ppp.php" method="post">
|
||||
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
|
||||
</form>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form action="diag_logs_ppp.php" method="post">
|
||||
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -46,19 +46,11 @@ if ($_POST['clear']) {
|
||||
clear_clog($system_logfile);
|
||||
}
|
||||
|
||||
if ($_GET['filtertext']) {
|
||||
$filtertext = htmlspecialchars($_GET['filtertext']);
|
||||
}
|
||||
|
||||
if ($_POST['filtertext']) {
|
||||
if (isset($_POST['filtertext'])) {
|
||||
$filtertext = htmlspecialchars($_POST['filtertext']);
|
||||
}
|
||||
|
||||
if ($filtertext) {
|
||||
$filtertextmeta = "?filtertext={$filtertext}";
|
||||
}
|
||||
|
||||
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Resolver"));
|
||||
$pgtitle = array(gettext('System'), gettext('Log Files'), gettext('Resolver'));
|
||||
$shortcut_section = "resolver";
|
||||
include("head.inc");
|
||||
|
||||
@ -75,38 +67,30 @@ include("head.inc");
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<? include('diag_logs_pills.inc'); ?>
|
||||
</div>
|
||||
|
||||
<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
|
||||
if($filtertext)
|
||||
if (isset($filtertext))
|
||||
dump_clog($system_logfile, $nentries, true, array("$filtertext"), array("ppp"));
|
||||
else
|
||||
dump_clog($system_logfile, $nentries, true, array(), array("ppp"));
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<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>
|
||||
|
||||
<form id="clearform" name="clearform" action="diag_logs_resolver.php" method="post" class="__mt">
|
||||
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" type="text" class="pull-left __mr" />
|
||||
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -43,7 +43,11 @@ if ($_POST['clear']) {
|
||||
clear_clog($routing_logfile);
|
||||
}
|
||||
|
||||
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Routing"));
|
||||
if (isset($_POST['filtertext'])) {
|
||||
$filtertext = htmlspecialchars($_POST['filtertext']);
|
||||
}
|
||||
|
||||
$pgtitle = array(gettext('System'), gettext('Log Files'), gettext('Routing'));
|
||||
$shortcut_section = "routing";
|
||||
include("head.inc");
|
||||
|
||||
@ -61,26 +65,31 @@ include("head.inc");
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<? include('diag_logs_pills.inc'); ?>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<?php dump_clog($routing_logfile, $nentries); ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<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
|
||||
if (isset($filtertext))
|
||||
dump_clog($routing_logfile, $nentries, true, array("$filtertext"));
|
||||
else
|
||||
dump_clog($routing_logfile, $nentries, true, array());
|
||||
?>
|
||||
<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>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
$active_tab = isset($active_tab) ? $active_tab : $_SERVER['PHP_SELF'];
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("System"), $active_tab == "/diag_logs.php", "diag_logs.php");
|
||||
$tab_array[] = array(gettext("Firewall"), $active_tab == "/diag_logs_filter.php", "diag_logs_filter.php");
|
||||
$tab_array[] = array(gettext("DHCP"), $active_tab == "/diag_logs_dhcp.php", "diag_logs_dhcp.php");
|
||||
$tab_array[] = array(gettext("PPP"), $active_tab == "/diag_logs_ppp.php", "diag_logs_ppp.php");
|
||||
$tab_array[] = array(gettext("VPN"), $active_tab == "/diag_logs_vpn.php", "diag_logs_vpn.php");
|
||||
display_top_tabs($tab_array);
|
||||
@ -119,17 +119,12 @@ include("head.inc");
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? $active_tab = "/diag_logs_vpn.php"; include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<? $tab_group = 'vpn'; include('diag_logs_pills.inc'); ?>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr><td colspan="4"><? $tab_group = 'vpn'; include('diag_logs_pills.inc'); ?></td></tr>
|
||||
<?php if ($mode != "raw"): ?>
|
||||
<tr>
|
||||
<td class="listhdrr"><?=gettext("Time");?></td>
|
||||
@ -141,17 +136,17 @@ include("head.inc");
|
||||
<?php else:
|
||||
dump_clog("/var/log/{$logname}.log", $nentries);
|
||||
endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<tr><td colspan="4">
|
||||
<form action="diag_logs_vpn.php" method="post">
|
||||
<input type="hidden" name="vpntype" id="vpntype" value="<?=$vpntype;?>" />
|
||||
<input type="hidden" name="mode" id="mode" value="<?=$mode;?>" />
|
||||
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
|
||||
</form>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -45,7 +45,11 @@ if ($_POST['clear']) {
|
||||
clear_clog($wireless_logfile);
|
||||
}
|
||||
|
||||
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Wireless"));
|
||||
if (isset($_POST['filtertext'])) {
|
||||
$filtertext = htmlspecialchars($_POST['filtertext']);
|
||||
}
|
||||
|
||||
$pgtitle = array(gettext('System'),gettext('Log Files'),gettext('Wireless'));
|
||||
|
||||
include("head.inc");
|
||||
|
||||
@ -62,28 +66,30 @@ include("head.inc");
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.inc'); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<? include('diag_logs_pills.inc'); ?>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<?php dump_clog($wireless_logfile, $nentries); ?>
|
||||
<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
|
||||
if (isset($filtertext))
|
||||
dump_clog($wireless_logfile, $nentries, true, array("$filtertext"));
|
||||
else
|
||||
dump_clog($wireless_logfile, $nentries, true, array());
|
||||
?>
|
||||
<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>
|
||||
|
||||
<form action="diag_logs_wireless.php" method="post">
|
||||
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -425,7 +425,7 @@ function dump_clog($logfile, $tail, $withorig = true, $grepfor = '', $grepinvert
|
||||
}
|
||||
|
||||
if (!count($logarr)) {
|
||||
$logarr[] = sprintf(gettext('File %s is empty.'), $logfile);
|
||||
$logarr[] = sprintf(gettext('File %s yielded no results.'), $logfile);
|
||||
}
|
||||
|
||||
print_dump($logarr, $withorig);
|
||||
@ -456,7 +456,7 @@ function dump_log($logfile, $tail, $withorig = true, $grepfor = '', $grepinvert
|
||||
}
|
||||
|
||||
if (!count($logarr)) {
|
||||
$logarr[] = sprintf(gettext('File %s is empty.'), $logfile);
|
||||
$logarr[] = sprintf(gettext('File %s yielded no results.'), $logfile);
|
||||
}
|
||||
|
||||
print_dump($logarr, $withorig);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user