fixed bug to draw charts in custom reports

This commit is contained in:
alejandro-campos 2018-06-27 17:24:40 +02:00
parent f4ef0110b2
commit 25d252a8a4
1 changed files with 15 additions and 15 deletions

View File

@ -3879,8 +3879,23 @@ function reporting_value($report, $content, $type,$pdf) {
if($pdf){ if($pdf){
$only_image = 1; $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) { switch ($type) {
case 'max': case 'max':
if($content['lapse_calc'] == 0){ if($content['lapse_calc'] == 0){
$value = reporting_get_agentmodule_data_max( $value = reporting_get_agentmodule_data_max(
@ -3893,20 +3908,6 @@ function reporting_value($report, $content, $type,$pdf) {
} }
} }
else{ 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 = ' $value = '
<table border="0" style="margin:0 auto;text-align:center;"> <table border="0" style="margin:0 auto;text-align:center;">
<tr> <tr>
@ -4159,7 +4160,6 @@ function reporting_value($report, $content, $type,$pdf) {
<td rowspan="2" width="150px"> <td rowspan="2" width="150px">
</td> </td>
<td rowspan="2">'; <td rowspan="2">';
if($content['visual_format'] == 2 || $content['visual_format'] == 3){ if($content['visual_format'] == 2 || $content['visual_format'] == 3){
$params['force_interval'] = 'avg_only'; $params['force_interval'] = 'avg_only';
$value .= grafico_modulo_sparse($params); $value .= grafico_modulo_sparse($params);