diff options
author | NOYB <Al_Stu@Frontier.com> | 2016-01-24 00:16:44 -0800 |
---|---|---|
committer | NOYB <Al_Stu@Frontier.com> | 2016-01-24 00:16:44 -0800 |
commit | fe48e6d7a8697d9c1521795df0e68ab83bbed602 (patch) | |
tree | b6f9b56eb3c904181ad20efb57d4b3170cd18b77 /src | |
parent | db35a716bc4330caa95ad7bbdb99d87eeffbee0b (diff) | |
download | pfsense-fe48e6d7a8697d9c1521795df0e68ab83bbed602.zip pfsense-fe48e6d7a8697d9c1521795df0e68ab83bbed602.tar.gz |
Status / System Logs / Firewall / Dynamic View - Tweaks
Don't run through the update table rows routine unless there are new rows to be added.
Handle special case when beginning with zero rows.
Remove classes listMRodd and listMReven. They don't exist and are handled by the table-striped class.
Add class text-nowrap to rows (consistent with the source html).
Add no logs to display info box.
Diffstat (limited to 'src')
-rwxr-xr-x | src/usr/local/www/status_logs_filter_dynamic.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php index 7c6085b..a092669 100755 --- a/src/usr/local/www/status_logs_filter_dynamic.php +++ b/src/usr/local/www/status_logs_filter_dynamic.php @@ -298,7 +298,7 @@ function in_arrayi(needle, haystack) { } function update_table_rows(data) { - if (isPaused) { + if ((isPaused) || (data.length < 1)) { return; } @@ -328,6 +328,10 @@ function update_table_rows(data) { move = 0; } + if (($("#count").text() == 0) && (data.length < nentries)){ + move += rows.length; + } + if (isReverse == false) { for (var i = move; i < rows.length; i++) { $(rows[i - move]).html($(rows[i]).html()); @@ -363,7 +367,7 @@ function update_table_rows(data) { // Much easier to go through each of the rows once they've all be added. rows = $('#filter-log-entries>tr'); for (var i = 0; i < rows.length; i++) { - rows[i].className = i % 2 == 0 ? 'listMRodd' : 'listMReven'; + rows[i].className = 'text-nowrap'; } $("#count").html(rows.length); @@ -429,7 +433,6 @@ function toggleListDescriptions() { $tcpcnt = 0; foreach ($filterlog as $filterent) { - $evenRowClass = $rowIndex % 2 ? " listMReven" : " listMRodd"; $rowIndex++; if ($filterent['version'] == '6') { $srcIP = "[" . htmlspecialchars($filterent['srcip']) . "]"; @@ -477,6 +480,13 @@ function toggleListDescriptions() { <?php } // e-o-foreach() ?> +<?php + if (count($filterlog) == 0) { + print '<tr class="text-nowrap"><td colspan=6>'; + print_info_box(gettext('No logs to display')); + print '</td></tr>'; + } +?> </tbody> </table> </div> |