authorize('settings:manage'); } public function refresh(): void { // Löst nur ein Re-Render aus; snapshot() wird in with() neu berechnet. } /** * @return array */ public function with(AdminSystemHealth $health): array { return [ 'health' => $health->snapshot(), ]; } }; ?> @php $statusMeta = [ 'ok' => ['color' => 'green', 'label' => __('OK'), 'variant' => 'ok'], 'warn' => ['color' => 'amber', 'label' => __('Achtung'), 'variant' => 'warn'], 'critical' => ['color' => 'red', 'label' => __('Kritisch'), 'variant' => 'warn'], ]; $overall = $statusMeta[$health['overall']] ?? $statusMeta['warn']; $queue = $health['queue']; @endphp
{{-- ============== PAGE HEADER ============== --}} {{ __('Gesamtstatus') }}: {{ $overall['label'] }} {{ __('Aktualisieren') }}

{{ __('Stand') }}: {{ $health['generated_at']->format('d.m.Y H:i:s') }} · {{ __('Version') }}: {{ config('app.version') ?? __('unbekannt (keine RELEASE-Datei)') }}

{{-- ============== QUEUE-KPIs ============== --}}
{{ __('Treiber') }}: {{ $queue['driver'] }} @if ($queue['oldest_pending_seconds'] !== null) {{ __('ältester Job') }}: {{ $queue['oldest_pending_seconds'] }}s @else {{ __('keine Wartejobs') }} @endif {{ __('verzögert') }}: {{ number_format($queue['delayed']) }} {{ __('in Verarbeitung') }}: {{ number_format($queue['reserved']) }} {{ __('gesamt') }}: {{ number_format($queue['failed_total']) }} {{ __('failed_jobs') }} {{ __('Betrieb') }} {{ __('Queue + Deployment') }}
{{-- ============== DEPLOYMENT-CHECKS ============== --}}
{{ __('Deployment- & Konfigurations-Checks') }}
@foreach ($health['checks'] as $check) @php $meta = $statusMeta[$check['status']] ?? $statusMeta['warn']; @endphp

{{ $check['label'] }}

{{ $check['detail'] }}

{{ $meta['label'] }}
@endforeach
{{-- ============== FEHLGESCHLAGENE JOBS ============== --}}
{{ __('Zuletzt fehlgeschlagene Jobs') }} {{ count($queue['recent_failures']) }}
@if (count($queue['recent_failures']) === 0)
{{ __('Keine fehlgeschlagenen Jobs.') }}
@else
@foreach ($queue['recent_failures'] as $failure) @endforeach
{{ __('Zeitpunkt') }} {{ __('Queue') }} {{ __('Job') }} {{ __('Fehler') }}
{{ $failure['failed_at']->format('d.m. H:i') }} {{ $failure['queue'] }} {{ $failure['job'] }} {{ $failure['error'] }}
@endif