mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
fix histogram pandora_enterprise#9720
This commit is contained in:
parent
9cfdcc765c
commit
baea5c36b4
@ -8330,14 +8330,17 @@ function reporting_advanced_sla(
|
|||||||
|
|
||||||
$sla_check_value_warning = false;
|
$sla_check_value_warning = false;
|
||||||
if ($sla_check_value === true) {
|
if ($sla_check_value === true) {
|
||||||
// Warning SLA check.
|
if ((isset($min_value_warning) === false
|
||||||
$sla_check_value_warning = sla_check_value(
|
&& isset($max_value_warning) === false) === false
|
||||||
$current_data['datos'],
|
) {
|
||||||
$min_value_warning,
|
// Warning SLA check.
|
||||||
$max_value_warning,
|
$sla_check_value_warning = sla_check_value(
|
||||||
$inverse_interval_warning,
|
$current_data['datos'],
|
||||||
1
|
$min_value_warning,
|
||||||
);
|
$max_value_warning,
|
||||||
|
$inverse_interval_warning
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14986,8 +14989,6 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
|
|||||||
|
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
$urlImage = ui_get_full_url(false, true, false, false);
|
|
||||||
|
|
||||||
$return['type'] = $content['type'];
|
$return['type'] = $content['type'];
|
||||||
|
|
||||||
$ttl = 1;
|
$ttl = 1;
|
||||||
@ -15173,6 +15174,7 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
|
|||||||
$data['checks_total'] = 0;
|
$data['checks_total'] = 0;
|
||||||
$data['checks_ok'] = 0;
|
$data['checks_ok'] = 0;
|
||||||
$data['checks_error'] = 0;
|
$data['checks_error'] = 0;
|
||||||
|
$data['checks_warning'] = 0;
|
||||||
$data['checks_unknown'] = 0;
|
$data['checks_unknown'] = 0;
|
||||||
$data['checks_not_init'] = 0;
|
$data['checks_not_init'] = 0;
|
||||||
|
|
||||||
@ -15198,14 +15200,13 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
|
|||||||
if ($value_sla['time_error'] > 0) {
|
if ($value_sla['time_error'] > 0) {
|
||||||
// ERR.
|
// ERR.
|
||||||
$array_graph[$i]['data'] = 3;
|
$array_graph[$i]['data'] = 3;
|
||||||
} else if ($value_sla['time_warning'] > 0) {
|
|
||||||
// Warning.
|
|
||||||
$array_graph[$i]['data'] = 2;
|
|
||||||
} else if ($value_sla['time_unknown'] > 0) {
|
} else if ($value_sla['time_unknown'] > 0) {
|
||||||
// UNKNOWN.
|
// UNKNOWN.
|
||||||
$array_graph[$i]['data'] = 4;
|
$array_graph[$i]['data'] = 4;
|
||||||
} else if ($value_sla['time_not_init'] == $value_sla['time_total']
|
} else if ($value_sla['time_warning'] > 0) {
|
||||||
) {
|
// Warning.
|
||||||
|
$array_graph[$i]['data'] = 2;
|
||||||
|
} else if ($value_sla['time_not_init'] == $value_sla['time_total']) {
|
||||||
// NOT INIT.
|
// NOT INIT.
|
||||||
$array_graph[$i]['data'] = 6;
|
$array_graph[$i]['data'] = 6;
|
||||||
} else {
|
} else {
|
||||||
@ -15215,21 +15216,7 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
|
|||||||
$array_graph[$i]['data'] = 7;
|
$array_graph[$i]['data'] = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
$array_graph[$i]['utimestamp'] = (
|
$array_graph[$i]['utimestamp'] = ($value_sla['date_to'] - $value_sla['date_from']);
|
||||||
$value_sla['date_to'] - $value_sla['date_from']);
|
|
||||||
|
|
||||||
if (isset($planned_downtimes)) {
|
|
||||||
foreach ($planned_downtimes as $pd) {
|
|
||||||
if (($value_sla['date_from'] >= $pd['date_from'])
|
|
||||||
&& ($value_sla['date_to'] <= $pd['date_to'])
|
|
||||||
) {
|
|
||||||
$array_graph[$i]['data'] = 5;
|
|
||||||
// In scheduled downtime.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15254,11 +15241,6 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
|
|||||||
} else {
|
} else {
|
||||||
if ($data_init == $value['data']) {
|
if ($data_init == $value['data']) {
|
||||||
$acum = ($acum + $value['utimestamp']);
|
$acum = ($acum + $value['utimestamp']);
|
||||||
if ($modules_is_string === false) {
|
|
||||||
$sum = ($sum + $value['real_data']);
|
|
||||||
} else {
|
|
||||||
$sum = $value['real_data'];
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$array_result[$i]['data'] = $data_init;
|
$array_result[$i]['data'] = $data_init;
|
||||||
$array_result[$i]['utimestamp'] = $acum;
|
$array_result[$i]['utimestamp'] = $acum;
|
||||||
@ -15266,7 +15248,6 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
|
|||||||
$i++;
|
$i++;
|
||||||
$data_init = $value['data'];
|
$data_init = $value['data'];
|
||||||
$acum = $value['utimestamp'];
|
$acum = $value['utimestamp'];
|
||||||
$sum = $value['real_data'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user