From 3f253b9db488e4b26aef7bdc37989e8eebf1fc49 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 20 Sep 2017 15:44:30 +0200 Subject: [PATCH] Added restriction when report comes from template --- pandora_console/include/functions_reporting.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 0baeb463f7..8969718ca8 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -98,7 +98,8 @@ function reporting_get_name($id_report) { function reporting_make_reporting_data($report = null, $id_report, $date, $time, $period = null, $type = 'dinamic', - $force_width_chart = null, $force_height_chart = null, $pdf= false) { + $force_width_chart = null, $force_height_chart = null, $pdf= false, + $from_template = false) { global $config; @@ -161,6 +162,10 @@ function reporting_make_reporting_data($report = null, $id_report, } } } + + if (!empty($report) && $from_template) { + $agents_to_macro = $content['id_agent']; + } $agents_to_macro_aux = array(); foreach ($agents_to_macro as $ag) { @@ -10320,7 +10325,6 @@ function reporting_get_agentmodule_sla_working_timestamp ($period, $date_end, $w } function reporting_label_macro ($item, $label) { - switch ($item['type']) { case 'event_report_agent': case 'alert_report_agent':