user()?->hasAnyRole(['Super-Admin', 'Admin']), 403); }); $health = computed(fn () => app(SystemStatus::class)->health()); $application = computed(fn () => app(SystemStatus::class)->application()); $tasks = computed(fn () => app(SystemStatus::class)->scheduledTasks()); $failedJobs = computed(fn () => app(SystemStatus::class)->failedJobs()); $errors = computed(fn () => app(SystemStatus::class)->recentLogEntries('laravel', ['ERROR', 'CRITICAL', 'ALERT', 'EMERGENCY'])); $alerts = computed(fn () => app(SystemStatus::class)->recentLogEntries('monitoring', ['CRITICAL', 'ERROR', 'WARNING'])); $links = computed(fn () => app(SystemStatus::class)->links()); $refresh = function () { unset($this->health, $this->tasks, $this->failedJobs, $this->errors, $this->alerts); }; $sendTestAlert = function () { OperationalAlert::send('Test-Alarm aus dem Admin (Monitoring)', ['ausgeloest_von' => auth()->id()]); unset($this->alerts); Flux::toast(variant: 'success', heading: 'Test-Alarm gesendet', text: 'Mail und Push gehen an die konfigurierten Empfänger; der Eintrag steht unten unter „Alarme“.'); }; ?> @php $statusColor = fn (string $status) => match ($status) { HealthProbe::StatusOk => 'green', HealthProbe::StatusWarn => 'amber', default => 'red', }; $statusLabel = fn (string $status) => match ($status) { HealthProbe::StatusOk => 'OK', HealthProbe::StatusWarn => 'Warnung', default => 'Kritisch', }; @endphp