From 4ab6b29befe83a456bd00b1d4e184d6db4188c1d Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Wed, 14 Feb 2024 10:41:29 +0100 Subject: [PATCH] Added references to netwflow filters reports --- pandora_console/include/class/Prd.class.php | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/pandora_console/include/class/Prd.class.php b/pandora_console/include/class/Prd.class.php index ad740f9bf3..cfd6e754f8 100644 --- a/pandora_console/include/class/Prd.class.php +++ b/pandora_console/include/class/Prd.class.php @@ -238,6 +238,13 @@ class Prd */ private $treport; + /** + * Reference to tnetflow_filter. + * + * @var array + */ + private $tnetflowFilter; + /** * Column references. * @@ -702,6 +709,26 @@ class Prd 'columns' => ['name'], ]; + $this->tnetflowFilter = [ + 'table' => 'tnetflow_filter', + 'id' => 'id_sg', + 'columns' => [ + 'ip_dst', + 'ip_src', + 'dst_port', + 'src_port', + 'router_ip', + 'advanced_filter', + 'filter_args', + 'aggregate', + 'netflow_monitoring', + 'traffic_max', + 'traffic_critical', + 'traffic_warning', + 'netflow_monitoring_interval', + ], + ]; + // Define references between tables fields. $this->columnRefs = [ 'tlayout' => [ @@ -728,6 +755,26 @@ class Prd 'id_group' => ['ref' => $this->tgrupo], 'id_module_group' => ['ref' => $this->tmoduleGroup], 'ncm_agents' => ['ref' => ($this->tagente + ['array' => true])], + 'text' => [ + 'conditional_refs' => [ + [ + 'when' => ['type' => 'netflow_area'], + 'ref' => $this->tnetflowFilter, + ], + [ + 'when' => ['type' => 'netflow_data'], + 'ref' => $this->tnetflowFilter, + ], + [ + 'when' => ['type' => 'netflow_summary'], + 'ref' => $this->tnetflowFilter, + ], + [ + 'when' => ['type' => 'netflow_top_N'], + 'ref' => $this->tnetflowFilter, + ] + ] + ], ], 'treport_content_item' => [ 'id_agent_module' => ['ref' => $this->tagenteModulo],