Fixed max_value report
This commit is contained in:
parent
921a025262
commit
6cf638a4d8
|
@ -513,6 +513,8 @@ function grafico_modulo_sparse_data(
|
|||
}
|
||||
$period_time_interval = $period_time_interval - $params['time_interval'];
|
||||
}
|
||||
//drag the last value to paint the graph correctly
|
||||
$acum_array_data[]= array( 0 => $start_period, 1 => $acum_array_data[$i-1][1]);
|
||||
$array_data['sum1']['data'] = $acum_array_data;
|
||||
}
|
||||
|
||||
|
|
|
@ -3816,7 +3816,8 @@ function reporting_value($report, $content, $type,$pdf) {
|
|||
'type_graph' => $config['type_module_charts'],
|
||||
'time_interval' => $content['lapse'],
|
||||
'server_id' => $id_meta,
|
||||
'height' => $config['graph_image_height']
|
||||
'height' => $config['graph_image_height'],
|
||||
'fullscale' => true
|
||||
);
|
||||
|
||||
switch ($type) {
|
||||
|
@ -3896,18 +3897,17 @@ function reporting_value($report, $content, $type,$pdf) {
|
|||
</th>
|
||||
</tr>
|
||||
<tr>';
|
||||
$time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module']);
|
||||
$time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module'], true);
|
||||
$date_reference = getdate();
|
||||
|
||||
for ($i=$date_reference[0]; $i > ($date_reference[0]-$content["period"]); $i -= $content["lapse"]) {
|
||||
|
||||
$value .= '<tr><td style="padding:5px;">'. date("Y-m-d H:i:s", ($i-$content["lapse"]+1)).' to '.date("Y-m-d H:i:s",$i).'</td><td>';
|
||||
|
||||
if($i>$time_begin['utimestamp']){
|
||||
if ($i>$time_begin['utimestamp']) {
|
||||
$value .= format_for_graph(reporting_get_agentmodule_data_max(
|
||||
$content['id_agent_module'], $content["lapse"], $i), $config['graph_precision']) . ' ' . $unit.'</td></tr>';
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$value .= 'N/A</td></tr>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue