From 2f6c3b79dd6ee0fbca8a93778529f48937277464 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 13 Mar 2019 18:59:14 +0100 Subject: [PATCH] firewall, per rule statistics. add inspect button, for https://github.com/opnsense/core/issues/3312 --- src/www/firewall_rules.php | 155 +++++++++++++++++++++++++------------ 1 file changed, 107 insertions(+), 48 deletions(-) diff --git a/src/www/firewall_rules.php b/src/www/firewall_rules.php index 7c48a54ed..57cb49d0b 100644 --- a/src/www/firewall_rules.php +++ b/src/www/firewall_rules.php @@ -138,6 +138,7 @@ $main_buttons = array( $lockout_spec = filter_core_get_antilockout(); legacy_html_escape_form_data($a_filter); +$all_rule_stats = json_decode(configd_run("filter rule stats"), true); ?> +
@@ -364,17 +392,21 @@ $( document ).ready(function() {   - - - - - - - + + + + + + + + + + + - + @@ -386,13 +418,17 @@ $( document ).ready(function() {   - IPv6 * - * - * - * - * - * -   + IPv6 * + * + * + * + * + * +   + + + + @@ -405,13 +441,17 @@ $( document ).ready(function() {   - * - * + * + * * *   + + + + @@ -429,14 +469,18 @@ $( document ).ready(function() { - * - - * - * - * - * -   - + * + + * + * + * + * +   + + + + + @@ -452,13 +496,17 @@ $( document ).ready(function() { - * - - * - * - * - * -   + * + + * + * + * + * +   + + + + @@ -476,9 +524,9 @@ $( document ).ready(function() { $selected_if == 'FloatingRules' ) ): - // calculate a hash so we can track these records in the rulset, new style (mvc) code will + // calculate a hash so we can track these records in the ruleset, new style (mvc) code will // automatically provide us with a uuid, this is a workaround to provide some help with tracking issues. - $filterent['md5'] = md5(json_encode($filterent)); + $rule_hash = OPNsense\Firewall\Util::calcRuleHash($filterent); $interface_has_rules = true; // select icon @@ -540,7 +588,7 @@ $( document ).ready(function() { - + - +   @@ -588,7 +636,7 @@ $( document ).ready(function() { - +   @@ -602,7 +650,7 @@ $( document ).ready(function() { - + @@ -616,7 +664,7 @@ $( document ).ready(function() { - +   @@ -630,7 +678,7 @@ $( document ).ready(function() { - + @@ -639,7 +687,7 @@ $( document ).ready(function() { * - + + + + +
- +
@@ -727,8 +779,11 @@ $( document ).ready(function() { - - + + + + +