summaryrefslogtreecommitdiffstats
path: root/src/etc/inc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-11-03 08:24:41 +0545
committerPhil Davis <phil.davis@inf.org>2015-11-03 08:24:41 +0545
commitbbf80b2424bd1a7561531a4c383b8265d079b847 (patch)
treeb4dd8fb6647705a898208372864b592d2451a5a6 /src/etc/inc
parentf0ac86217ca827ee0203cabfe50bca80a50bb185 (diff)
downloadpfsense-bbf80b2424bd1a7561531a4c383b8265d079b847.zip
pfsense-bbf80b2424bd1a7561531a4c383b8265d079b847.tar.gz
Filter log dynamic pass/block button
This should fix up the last bits here: 1) Make the button be red cross, green tick depending and block or pass rule. 2) Put all the necessary bits in the getURL - now the rule display popup works when the button is clicked.
Diffstat (limited to 'src/etc/inc')
-rw-r--r--src/etc/inc/filter_log.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/etc/inc/filter_log.inc b/src/etc/inc/filter_log.inc
index 24b30fa..3b6ebd5 100644
--- a/src/etc/inc/filter_log.inc
+++ b/src/etc/inc/filter_log.inc
@@ -445,16 +445,18 @@ function handle_ajax($nentries, $tail = 50) {
$filterlog = isset($config['syslog']['reverse']) ? array_reverse($filterlog) : $filterlog;
foreach ($filterlog as $log_row) {
$row_time = strtotime($log_row['time']);
- $img = '<i class="icon-large ' . find_action_image($log_row['act']) . '" alt={$log_row[\'act\']}/{$log_row[\'tracker\']} title={$log_row[\'act\']}/{$log_row[\'tracker\']} ></i>"';
if ($row_time > $lastsawtime) {
if ($log_row['proto'] == "TCP") {
$log_row['proto'] .= ":{$log_row['tcpflags']}";
}
+ if ($log_row['act'] == "block") {
+ $icon_act = "fa-times icon-danger";
+ } else {
+ $icon_act = "fa-check icon-success";
+ }
- $btn = '<i class="fa fa-times icon-danger icon-pointer" title="' . $log_row['act'] . '/' . $log_row['tracker'] . '" onclick="javascript:getURL(\'diag_logs_filter.php?getrulenum="' . $filterent['rulenum'] . ',' . $filterent['tracker'] . ',' . $filterent['act'] . '\'"; , outputrule);" ></i>';
-
-// $btn = "<a href=\"#\" class=\"btn btn-danger btn-xs\" onClick=\"javascript:getURL('diag_logs_filter.php?getrulenum={$log_row['rulenum']},{$log_row['tracker']},{$log_row['act']}', outputrule);\">" . gettext("Block") . " </a>";
+ $btn = '<i class="fa ' . $icon_act . ' icon-pointer" title="' . $log_row['act'] . '/' . $log_row['tracker'] . '" onclick="javascript:getURL(\'diag_logs_filter.php?getrulenum=' . $log_row['rulenum'] . ',' . $log_row['tracker'] . ',' . $log_row['act'] . '\', outputrule);"></i>';
$new_rules .= "{$btn}||{$log_row['time']}||{$log_row['interface']}||{$log_row['srcip']}||{$log_row['srcport']}||{$log_row['dstip']}||{$log_row['dstport']}||{$log_row['proto']}||{$log_row['version']}||" . time() . "||\n";
}
}
OpenPOWER on IntegriCloud