Calculate downtime from device_outages table (#15397)

* Calculate downtime from device_outages table

* refactor
This commit is contained in:
Tony Murray
2023-10-06 20:37:23 -05:00
committed by GitHub
parent 6d9178cd42
commit e53436b6a3
4 changed files with 29 additions and 6 deletions

View File

@@ -182,7 +182,7 @@ class ConnectivityHelper
}
// check for open outage
$open_outage = $this->device->outages()->whereNull('up_again')->orderBy('going_down', 'desc')->first();
$open_outage = $this->device->getCurrentOutage();
if ($status) {
if ($open_outage) {