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':