diff options
author | NOYB <Al_Stu@Frontier.com> | 2016-01-06 09:57:01 -0800 |
---|---|---|
committer | NOYB <Al_Stu@Frontier.com> | 2016-01-06 13:38:30 -0800 |
commit | c407c84db57d361ce8d99f54125d38fbdd903836 (patch) | |
tree | 8c1bc8fadb54e931c8362111c98e3b4b7a20f34a /src/usr/local/www/status_logs_vpn.php | |
parent | e99af53d042cb23f963a41e7da77df3abf0254f7 (diff) | |
download | pfsense-c407c84db57d361ce8d99f54125d38fbdd903836.zip pfsense-c407c84db57d361ce8d99f54125d38fbdd903836.tar.gz |
Fixed up for vpn.log filtering.
Diffstat (limited to 'src/usr/local/www/status_logs_vpn.php')
-rw-r--r-- | src/usr/local/www/status_logs_vpn.php | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/src/usr/local/www/status_logs_vpn.php b/src/usr/local/www/status_logs_vpn.php index 8c69998..17def8a 100644 --- a/src/usr/local/www/status_logs_vpn.php +++ b/src/usr/local/www/status_logs_vpn.php @@ -136,17 +136,14 @@ filter_form_vpn(); // Now the forms are complete we can draw the log table and its controls if (!$rawfilter) { - if ($logfile != "vpn") { # Needs to be tested with a vpn.log file before enabling. - if ($filterlogentries_submit) { - $filterlog = conv_log_filter($vpn_logfile, $nentries, $nentries + 100, $filterfieldsarray); - } else { - $filterlog = conv_log_filter($vpn_logfile, $nentries, $nentries + 100, $filtertext); - } + if ($filterlogentries_submit) { + $filterlog = conv_log_filter($vpn_logfile, $nentries, $nentries + 100, $filterfieldsarray); + } else { + $filterlog = conv_log_filter($vpn_logfile, $nentries, $nentries + 100, $filtertext); } ?> <div class="panel panel-default"> -<?php if ($logfile != "vpn") { # Needs to be tested with a vpn.log file before enabling. ?> <div class="panel-heading"> <h2 class="panel-title"> <?php @@ -160,9 +157,6 @@ if (!$rawfilter) { ?> </h2> </div> -<?php } else { ?> - <div class="panel-heading"><h2 class="panel-title"><?=gettext("Last ")?><?=$nentries?> <?=gettext($allowed_logs[$logfile]["name"])?><?=gettext(" log entries")?></h2></div> -<?php } ?> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable> @@ -179,8 +173,8 @@ if (!$rawfilter) { </thead> <tbody> <?php - if ($logfile != "vpn") { # Needs to be tested with a vpn.log file before enabling. - foreach ($filterlog as $filterent) { + foreach ($filterlog as $filterent) { + if (preg_match('/' . $vpntype . '/', $filterent['type'])) { ?> <tr class="text-nowrap"> <td> @@ -188,9 +182,9 @@ if (!$rawfilter) { </td> <td> <? if ($filterent['action'] == "login") { ?> - <i class=\"fa fa-arrow-left\" alt=\"in\"></i> + <i class="fa fa-arrow-left" title="in"></i> <? } else { ?> - <i class=\"fa fa-arrow-right\" alt=\"out\"></i> + <i class="fa fa-arrow-right" title="out"></i> <? } ?> </td> <td> @@ -201,11 +195,8 @@ if (!$rawfilter) { </td> </tr> <?php - } // e-o-foreach - } else { # Continue using dump clog function until tested with a vpn.log file. - $rows = dump_clog_vpn($vpn_logfile, $nentries); // dump_clog_vpn provides all the need <td></td>/<tr></tr> tags - if ($rows > 0) $filterlog[0] = ''; - } + } + } // e-o-foreach ?> </tbody> <?php @@ -501,9 +492,7 @@ function filter_form_vpn() { $group->setHelp('<a target="_blank" href="http://www.php.net/manual/en/book.pcre.php">' . gettext('Regular expression reference') . '</a> ' . gettext('Precede with exclamation (!) to exclude match.')); $section->add($group); $form->add($section); - if ($logfile != "vpn") { # Needs to be tested with a vpn.log file before enabling. - print $form; - } + print $form; } ?> |