diff --git a/app/Filament/Pages/Monitoring/Commandocentrum.php b/app/Filament/Pages/Monitoring/Commandocentrum.php index ec4e4fa..3e438aa 100755 --- a/app/Filament/Pages/Monitoring/Commandocentrum.php +++ b/app/Filament/Pages/Monitoring/Commandocentrum.php @@ -11,6 +11,7 @@ use App\Models\Miscellaneous\WebsitePermission; use App\Models\StaffActivity; use App\Services\AutoDetectService; use App\Services\CatalogService; +use App\Services\Diagnostics\DiagnosticResult; use App\Services\Diagnostics\DiagnosticRunner; use App\Services\GitHubService; use App\Services\RconService; @@ -1072,7 +1073,12 @@ final class Commandocentrum extends Page implements HasForms private function runDiagnostics(): void { $runner = app(DiagnosticRunner::class); - $this->diagnostics = $runner->runAll(); + $this->diagnostics = array_map(fn (DiagnosticResult $r) => [ + 'name' => $r->name, + 'status' => $r->status, + 'message' => $r->message, + 'fix' => $r->fix, + ], $runner->runAll()); } private function renderDiagnostics(): HtmlString @@ -1081,9 +1087,9 @@ final class Commandocentrum extends Page implements HasForms $this->runDiagnostics(); } - $errors = array_filter($this->diagnostics, fn ($r) => $r->status === 'error'); - $warnings = array_filter($this->diagnostics, fn ($r) => $r->status === 'warning'); - $ok = array_filter($this->diagnostics, fn ($r) => $r->status === 'ok'); + $errors = array_filter($this->diagnostics, fn ($r) => $r['status'] === 'error'); + $warnings = array_filter($this->diagnostics, fn ($r) => $r['status'] === 'warning'); + $ok = array_filter($this->diagnostics, fn ($r) => $r['status'] === 'ok'); $errorCount = count($errors); $warningCount = count($warnings); @@ -1120,21 +1126,21 @@ final class Commandocentrum extends Page implements HasForms if ($errorCount > 0 || $warningCount > 0) { $html .= '