Merge branch '1217-name-macros-in-template-html-view-dev' into 'develop'

Added restriction when report comes from template

See merge request !834
This commit is contained in:
vgilc 2017-09-20 16:01:29 +02:00
commit c080ad6350
1 changed files with 6 additions and 2 deletions

View File

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