From 25d252a8a4cfeab491d38b65262a417dbca3f30f Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 27 Jun 2018 17:24:40 +0200 Subject: [PATCH] fixed bug to draw charts in custom reports --- .../include/functions_reporting.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f5f06cf73e..81938d66c9 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3879,8 +3879,23 @@ function reporting_value($report, $content, $type,$pdf) { if($pdf){ $only_image = 1; } + + $params =array( + 'agent_module_id' => $content['id_agent_module'], + 'period' => $content['period'], + 'width' => '600px', + 'pure' => false,///true + 'date' => $report["datetime"], + 'only_image' => $only_image, + 'homeurl' => ui_get_full_url(false, false, false, false), + 'ttl' => 1,///2 + 'type_graph' => $config['type_module_charts'], + 'time_interval' => $content['lapse'], + 'server_id' => $id_meta + ); switch ($type) { + case 'max': if($content['lapse_calc'] == 0){ $value = reporting_get_agentmodule_data_max( @@ -3893,20 +3908,6 @@ function reporting_value($report, $content, $type,$pdf) { } } else{ - $params =array( - 'agent_module_id' => $content['id_agent_module'], - 'period' => $content['period'], - 'width' => '600px', - 'pure' => false,///true - 'date' => $report["datetime"], - 'only_image' => $only_image, - 'homeurl' => ui_get_full_url(false, false, false, false), - 'ttl' => 1,///2 - 'type_graph' => $config['type_module_charts'], - 'time_interval' => $content['lapse'], - 'server_id' => $id_meta - ); - $value = ' @@ -4159,7 +4160,6 @@ function reporting_value($report, $content, $type,$pdf) {
'; - if($content['visual_format'] == 2 || $content['visual_format'] == 3){ $params['force_interval'] = 'avg_only'; $value .= grafico_modulo_sparse($params);