From 52b2726831c2f170b563ce7e579ffcaf24e17049 Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Mon, 10 Sep 2012 16:32:28 +0200 Subject: Added a setting for configuring the firewall log to either: -Not load descriptions -Show descriptions in a column -Show descriptions on a second row (after a click on 'show descriptions') 'fixed' a few html validation issues.. --- usr/local/www/diag_logs_filter.php | 76 +++++++++++++++++++++------------ usr/local/www/diag_logs_settings.php | 18 ++++++++ usr/local/www/javascript/filter_log.js | 12 ++++++ usr/local/www/themes/pfsense_ng/all.css | 4 ++ 4 files changed, 83 insertions(+), 27 deletions(-) (limited to 'usr') diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php index 112c916..a34e0a2 100755 --- a/usr/local/www/diag_logs_filter.php +++ b/usr/local/www/diag_logs_filter.php @@ -119,7 +119,7 @@ include("head.inc"); - - + - + + + - + - - - - - + + ".find_rule_by_number_buffer($filterent['rulenum'],$filterent['act']).""); + $int = strtolower($filterent['interface']); $proto = strtolower($filterent['proto']); if(is_ipaddrv6($filterent['srcip'])) { @@ -177,22 +188,33 @@ include("head.inc"); $srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto); $dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto); ?> - - - - + + + + + + diff --git a/usr/local/www/diag_logs_settings.php b/usr/local/www/diag_logs_settings.php index 23c4754..42cf79e 100755 --- a/usr/local/www/diag_logs_settings.php +++ b/usr/local/www/diag_logs_settings.php @@ -64,6 +64,7 @@ $pconfig['system'] = isset($config['syslog']['system']); $pconfig['enable'] = isset($config['syslog']['enable']); $pconfig['logdefaultblock'] = !isset($config['syslog']['nologdefaultblock']); $pconfig['rawfilter'] = isset($config['syslog']['rawfilter']); +$pconfig['filterdescriptions'] = $config['syslog']['filterdescriptions']; $pconfig['disablelocallogging'] = isset($config['syslog']['disablelocallogging']); if (!$pconfig['nentries']) @@ -116,6 +117,10 @@ if ($_POST) { $oldnologdefaultblock = isset($config['syslog']['nologdefaultblock']); $config['syslog']['nologdefaultblock'] = $_POST['logdefaultblock'] ? false : true; $config['syslog']['rawfilter'] = $_POST['rawfilter'] ? true : false; + if (is_numeric($_POST['filterdescriptions']) && $_POST['filterdescriptions'] > 0) + $config['syslog']['filterdescriptions'] = $_POST['filterdescriptions']; + else + unset($config['syslog']['filterdescriptions']); if($config['syslog']['enable'] == false) { unset($config['syslog']['remoteserver']); unset($config['syslog']['remoteserver2']); @@ -261,6 +266,19 @@ function check_everything() { + + + + +
-
+
" /> @@ -128,42 +128,53 @@ include("head.inc");
| | +

+ + Show rule descriptions + +
- - - - - - +
" class="listtopic"> + +
+
- ', outputrule);"> - <?php echo $filterent['act'];?> + ', outputrule);"> + <?php echo $filterent['act'];?>
- "> - " title="" onclick="return confirm('')"> + + "> + Icon Reverse Resolve with DNS + " title="" onclick="return confirm('')"> + Icon Easy Rule: Add to Block List - "> - " title="" onclick="return confirm('')"> + + "> + Icon Reverse Resolve with DNS + " title="" onclick="return confirm('')"> + Icon Easy Rule: Pass this traffic
+
Filter descriptions + + +
+
Local Logging onClick="enable_change(false)"> diff --git a/usr/local/www/javascript/filter_log.js b/usr/local/www/javascript/filter_log.js index 1259afb..3bfab6b 100644 --- a/usr/local/www/javascript/filter_log.js +++ b/usr/local/www/javascript/filter_log.js @@ -120,3 +120,15 @@ function toggle_pause() { if (typeof updateDelay != 'undefined') { timer = setInterval('fetch_new_rules()', updateDelay); } + +function showRuleDescriptions(){ + var ss = document.styleSheets; + for (var i=0; i