diff --git a/app/Server.php b/app/Server.php index 313a3e04b1b8d6d9c6bb750e6f30dc4ca5d5b9c4..35a8481d858437f837398105c9574a6bddbb6dc3 100644 --- a/app/Server.php +++ b/app/Server.php @@ -55,8 +55,8 @@ class Server extends Model { $failing_sensors = []; - foreach ($this->getSensorsNOK() as $sensor) { - $failing_sensors[] = $sensor->name(); + foreach ($this->getSensorsNOK() as $report) { + $failing_sensors[] = $report->title; } return $failing_sensors; @@ -123,6 +123,10 @@ class Server extends Model return $this->lastSummary()->status(); } + /** + * + * @return Collection<Report> + */ public function getSensorsNOK() : Collection { $summary = $this->lastSummary();