Merge branch 'ent-11323-histogram-graph-rompe-informe-cuando-el-intervalo-seleccionado-no-tiene-datos' into 'develop'

Ent 11323 histogram graph rompe informe cuando el intervalo seleccionado no tiene datos

See merge request artica/pandorafms!5941
This commit is contained in:
Daniel Rodriguez 2023-05-25 09:40:37 +00:00
commit 72108c6bea
1 changed files with 5 additions and 1 deletions

View File

@ -15832,7 +15832,11 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
$return['time_critical'] = $data['time_error'];
$return['time_warning'] = $data['time_warning'];
$return['time_ok'] = $data['time_ok'];
$return['percent_ok'] = (($data['checks_ok'] * 100) / $data['checks_total']);
if ($data['checks_total'] > 0) {
$return['percent_ok'] = (($data['checks_ok'] * 100) / $data['checks_total']);
} else {
$return['percent_ok'] = 0;
}
$colors = [
1 => COL_NORMAL,