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'];
|
$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;
|
$array_data['sum1']['data'] = $acum_array_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3816,7 +3816,8 @@ function reporting_value($report, $content, $type,$pdf) {
|
||||||
'type_graph' => $config['type_module_charts'],
|
'type_graph' => $config['type_module_charts'],
|
||||||
'time_interval' => $content['lapse'],
|
'time_interval' => $content['lapse'],
|
||||||
'server_id' => $id_meta,
|
'server_id' => $id_meta,
|
||||||
'height' => $config['graph_image_height']
|
'height' => $config['graph_image_height'],
|
||||||
|
'fullscale' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
@ -3896,7 +3897,7 @@ function reporting_value($report, $content, $type,$pdf) {
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<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();
|
$date_reference = getdate();
|
||||||
|
|
||||||
for ($i=$date_reference[0]; $i > ($date_reference[0]-$content["period"]); $i -= $content["lapse"]) {
|
for ($i=$date_reference[0]; $i > ($date_reference[0]-$content["period"]); $i -= $content["lapse"]) {
|
||||||
|
@ -3906,8 +3907,7 @@ function reporting_value($report, $content, $type,$pdf) {
|
||||||
if ($i>$time_begin['utimestamp']) {
|
if ($i>$time_begin['utimestamp']) {
|
||||||
$value .= format_for_graph(reporting_get_agentmodule_data_max(
|
$value .= format_for_graph(reporting_get_agentmodule_data_max(
|
||||||
$content['id_agent_module'], $content["lapse"], $i), $config['graph_precision']) . ' ' . $unit.'</td></tr>';
|
$content['id_agent_module'], $content["lapse"], $i), $config['graph_precision']) . ' ' . $unit.'</td></tr>';
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$value .= 'N/A</td></tr>';
|
$value .= 'N/A</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue