diff --git a/src/opnsense/service/conf/actions.d/actions_filter.conf b/src/opnsense/service/conf/actions.d/actions_filter.conf index 6962f6e1c..c543fb51f 100644 --- a/src/opnsense/service/conf/actions.d/actions_filter.conf +++ b/src/opnsense/service/conf/actions.d/actions_filter.conf @@ -27,3 +27,9 @@ command:/usr/local/sbin/pftop parameters: -w 200 -b -o %s -v %s %s type:script_output message:request pftop statistics + +[diag.info] +command:/usr/local/opnsense/scripts/filter/pfinfo.py +parameters: %s +type:script_output +message:request pf diagnostic information diff --git a/src/www/diag_pf_info.php b/src/www/diag_pf_info.php index 26afecd0e..e5c39980a 100644 --- a/src/www/diag_pf_info.php +++ b/src/www/diag_pf_info.php @@ -29,67 +29,74 @@ require_once("guiconfig.inc"); $pgtitle = gettext("Diagnostics: pfInfo"); +$data_tabs = array("info", "memory", "timeouts", "interfaces"); -if($_REQUEST['getactivity']) { - $text = `/sbin/pfctl -vvsi`; - $text .= "

"; - $text .= `/sbin/pfctl -vvsm`; - $text .= "

"; - $text .= `/sbin/pfctl -vvst`; - $text .= "

"; - $text .= `/sbin/pfctl -vvsI`; - echo $text; - exit; +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + if (isset($_POST['getactivity'])) { + $diag = configd_run("filter diag info json"); + echo $diag; + } + exit; } include("head.inc"); - ?> - -

-
-
-
- - - "; - print_info_box($savemsg); - echo "
"; - } - if (isset($input_errors) && count($input_errors) > 0) - print_input_errors($input_errors); - ?> - -
- -
- -
- - +
+
+
+ +
+ $tabname):?> +
+
+
+                
+                
+
+
+ +
+
+
+