diff options
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/local/www/status_logs.php | 28 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_filter.php | 28 | ||||
-rwxr-xr-x | src/usr/local/www/status_logs_filter_dynamic.php | 22 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_vpn.php | 28 |
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"); ?> |