Skip to content
Snippets Groups Projects
Commit daeab79d authored by Thibault Debatty's avatar Thibault Debatty
Browse files

fix json dashboard

parent 2deeb092
No related branches found
No related tags found
No related merge requests found
Pipeline #13352 failed
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment