summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2016-01-23 01:11:06 -0800
committerNOYB <Al_Stu@Frontier.com>2016-01-23 01:11:06 -0800
commit98bf911e939fe8f46974e8f86dbc556d0feeb360 (patch)
tree0ae4f375498525af1516065b83f0bcfaa4713762 /src
parent4d47827275a3ee5fdafd95773eb6924b2698c611 (diff)
downloadpfsense-98bf911e939fe8f46974e8f86dbc556d0feeb360.zip
pfsense-98bf911e939fe8f46974e8f86dbc556d0feeb360.tar.gz
Status / System Logs - Filter Refinements
Use advanced filter in firewall dynamic view even if raw mode is set. Raw mode is not applicable to the firewall dynamic view. Update the count in firewall dynamic view. JQuery the actual count in raw mode instead of just displaying the max setting value. Change some negative logic to positive.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/local/www/status_logs.php28
-rw-r--r--src/usr/local/www/status_logs_filter.php28
-rwxr-xr-xsrc/usr/local/www/status_logs_filter_dynamic.php22
-rw-r--r--src/usr/local/www/status_logs_vpn.php28
4 files changed, 93 insertions, 13 deletions
diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php
index 5fb1da1..bdab7bf 100755
--- a/src/usr/local/www/status_logs.php
+++ b/src/usr/local/www/status_logs.php
@@ -160,10 +160,10 @@ if (!$rawfilter) {
<div class="panel-heading">
<h2 class="panel-title">
<?php
- if ((!$filtertext) && (!$filterfieldsarray)) {
- printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
- } else {
+ if (($filtersubmit) || ($filterlogentries_submit)) {
printf(gettext("%d matched %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
}
printf(" (" . gettext("Maximum %d") . ")", $nentries);
@@ -216,7 +216,19 @@ if (!$rawfilter) {
} else {
?>
<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext("Last ")?><?=$nentries?> <?=gettext($allowed_logs[$logfile]["name"])?><?=gettext(" log entries")?></h2></div>
+ <div class="panel-heading">
+ <h2 class="panel-title">
+<?php
+ if (($filtersubmit) || ($filterlogentries_submit)) {
+ printf(gettext("%s matched %s log entries."), "<span id='count'>_ _</span>", gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("Last %s %s log entries."), "<span id='count'>_ _</span>", gettext($allowed_logs[$logfile]["name"]));
+ }
+
+ printf(" (" . gettext("Maximum %d") . ")", $nentries);
+?>
+ </h2>
+ </div>
<div class="table table-responsive">
<table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
@@ -259,4 +271,12 @@ if (!$system_logs_manage_log_form_hidden) {
}
?>
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $("#count").html(<?=$rows?>);
+});
+//]]>
+</script>
+
<?php include("foot.inc"); ?>
diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php
index 2a2f008..dff8641 100644
--- a/src/usr/local/www/status_logs_filter.php
+++ b/src/usr/local/www/status_logs_filter.php
@@ -174,10 +174,10 @@ if (!$rawfilter) {
<div class="panel-heading">
<h2 class="panel-title">
<?php
- if ((!$filtertext) && (!$filterfieldsarray)) {
- printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
- } else {
+ if (($filtersubmit) || ($filterlogentries_submit)) {
printf(gettext("%d matched %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
}
printf(" (" . gettext("Maximum %d") . ")", $nentries);
@@ -325,7 +325,19 @@ if (!$rawfilter) {
} else {
?>
<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext("Last ")?><?=$nentries?> <?=gettext($allowed_logs[$logfile]["name"])?><?=gettext(" log entries")?></h2></div>
+ <div class="panel-heading">
+ <h2 class="panel-title">
+<?php
+ if (($filtersubmit) || ($filterlogentries_submit)) {
+ printf(gettext("%s matched %s log entries."), "<span id='count'>_ _</span>", gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("Last %s %s log entries."), "<span id='count'>_ _</span>", gettext($allowed_logs[$logfile]["name"]));
+ }
+
+ printf(" (" . gettext("Maximum %d") . ")", $nentries);
+?>
+ </h2>
+ </div>
<div class="table table-responsive">
<table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
@@ -449,5 +461,13 @@ events.push(function() {
//]]>
</script>
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $("#count").html(<?=$rows?>);
+});
+//]]>
+</script>
+
<?php include("foot.inc");
?>
diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php
index 92e95dc..838578a 100755
--- a/src/usr/local/www/status_logs_filter_dynamic.php
+++ b/src/usr/local/www/status_logs_filter_dynamic.php
@@ -132,6 +132,7 @@ if ($system_logs_manage_log_form_hidden) {
// Log Filter Submit - Firewall
+$rawfilter = false;
filter_form_firewall();
@@ -369,6 +370,8 @@ function update_table_rows(data) {
rows[i].className = i % 2 == 0 ? 'listMRodd' : 'listMReven';
}
+ $("#count").html(rows.length);
+
$('.fa').tooltip();
}
@@ -404,7 +407,16 @@ function toggleListDescriptions() {
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
- <?=gettext('Last ') . $nentries . gettext(' records. ') . gettext('Pause ')?><input type="checkbox" onclick="javascript:toggle_pause();" />
+<?php
+ if (($filtersubmit) || ($filterlogentries_submit)) {
+ printf(gettext("%s matched %s log entries."), "<span id='count'>_ _</span>", gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("Last %s %s log entries."), "<span id='count'>_ _</span>", gettext($allowed_logs[$logfile]["name"]));
+ }
+
+ printf(" (" . gettext("Maximum %d") . ")", $nentries);
+?>
+<?=" " . gettext('Pause') . " "?><input type="checkbox" onclick="javascript:toggle_pause();" />
</h2>
</div>
<div class="panel-body">
@@ -510,4 +522,12 @@ events.push(function() {
//]]>
</script>
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $("#count").html(<?=count($filterlog);?>);
+});
+//]]>
+</script>
+
<?php include("foot.inc");
diff --git a/src/usr/local/www/status_logs_vpn.php b/src/usr/local/www/status_logs_vpn.php
index 111e00a..ee2344f 100644
--- a/src/usr/local/www/status_logs_vpn.php
+++ b/src/usr/local/www/status_logs_vpn.php
@@ -159,10 +159,10 @@ if (!$rawfilter) {
<div class="panel-heading">
<h2 class="panel-title">
<?php
- if ((!$filtertext) && (!$filterfieldsarray)) {
- printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
- } else {
+ if (($filtersubmit) || ($filterlogentries_submit)) {
printf(gettext("%d matched %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
}
printf(" (" . gettext("Maximum %d") . ")", $nentries);
@@ -260,7 +260,19 @@ if (!$rawfilter) {
} else {
?>
<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext("Last ")?><?=$nentries?> <?=gettext($allowed_logs[$logfile]["name"])?><?=gettext(" log entries")?></h2></div>
+ <div class="panel-heading">
+ <h2 class="panel-title">
+<?php
+ if (($filtersubmit) || ($filterlogentries_submit)) {
+ printf(gettext("%s matched %s log entries."), "<span id='count'>_ _</span>", gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("Last %s %s log entries."), "<span id='count'>_ _</span>", gettext($allowed_logs[$logfile]["name"]));
+ }
+
+ printf(" (" . gettext("Maximum %d") . ")", $nentries);
+?>
+ </h2>
+ </div>
<div class="panel-body">
<pre><?php
$rows = dump_clog_no_table($logfile_path, $nentries, true, array($filtertext));
@@ -520,4 +532,12 @@ function filter_form_vpn() {
}
?>
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $("#count").html(<?=$rows?>);
+});
+//]]>
+</script>
+
<?php include("foot.inc"); ?>
OpenPOWER on IntegriCloud