mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Ignore negative values in reaction time
Negative values for reaction time make no sense in the reaction time chart. When the notification was acknowledged before it startet we assume a reaction time of 0. fixes #8198
This commit is contained in:
parent
75f65593e6
commit
8f9e970360
@ -400,6 +400,15 @@ class Monitoring_AlertsummaryController extends Controller
|
|||||||
$recover = 0;
|
$recover = 0;
|
||||||
if ($item->acknowledgement_entry_time) {
|
if ($item->acknowledgement_entry_time) {
|
||||||
$recover = $item->acknowledgement_entry_time - $item->notification_start_time;
|
$recover = $item->acknowledgement_entry_time - $item->notification_start_time;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Acknowledgements may happen before the actual notification starts, since notifications
|
||||||
|
* can be configured to start a certain time after the problem. In that case we assume
|
||||||
|
* a reaction time of 0s.
|
||||||
|
*/
|
||||||
|
if ($recover < 0) {
|
||||||
|
$recover = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$rData[$item->notification_object_id] = array(
|
$rData[$item->notification_object_id] = array(
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user