@extends('central.super.layout') @section('title', __('super.logs_health.title')) @push('styles') @endpush @section('content') {{-- Overall health banner --}}
@if($healthStatus['level'] === 'healthy') @elseif($healthStatus['level'] === 'warning') @else @endif

{{ __('super.logs_health.health_' . $healthStatus['level']) }}

@if($healthStatus['level'] === 'healthy') {{ __('super.logs_health.health_msg_healthy') }} @elseif($healthStatus['level'] === 'warning') {{ __('super.logs_health.health_msg_warning', ['count' => $stats['unresolved']]) }} @else {{ __('super.logs_health.health_msg_critical', ['count' => $stats['critical']]) }} @endif

{{-- Stats cards --}}

{{ number_format($stats['total']) }}

{{ __('super.logs_health.total_logs') }}

{{ number_format($stats['unresolved']) }}

{{ __('super.logs_health.unresolved') }}

{{ number_format($stats['critical']) }}

{{ __('super.logs_health.critical') }}

{{ number_format($stats['last_24h']) }}

{{ __('super.logs_health.last_24h') }}

{{ number_format($stats['resolved']) }}

{{ __('super.logs_health.resolved') }}

{{-- By type breakdown --}} @if(! empty($stats['by_type']))

{{ __('super.logs_health.unresolved_by_type') }}

@foreach($types as $typeKey => $typeLabel) @if(! empty($stats['by_type'][$typeKey])) {{ __('super.logs_health.type_' . $typeKey) }} {{ $stats['by_type'][$typeKey] }} @endif @endforeach
@endif
@if($filters['search'] || $filters['type'] || $filters['status'] || $filters['tenant'] || $filters['from'] || $filters['to']) {{ __('super.logs_health.clear') }} @endif {{ $logs->total() }} {{ __('super.logs_health.entries') }}
@forelse($logs as $log) @empty @endforelse
{{ __('super.logs_health.col_severity') }} {{ __('super.logs_health.col_type') }} {{ __('super.logs_health.col_tenant') }} {{ __('super.logs_health.col_message') }} {{ __('super.logs_health.col_occurred_at') }} {{ __('super.logs_health.col_status') }}
{{ __('super.logs_health.severity_' . $log->severity) }} {{ __('super.logs_health.type_' . $log->type) }} @if($log->tenant_id) {{ $log->tenant?->company_name ?? $log->tenant_id }} @else @endif {{ \Illuminate\Support\Str::limit($log->message, 100) }} @if($log->source) {{ $log->source }} @endif {{ $log->occurred_at?->diffForHumans() }} @if($log->isResolved()) {{ __('super.logs_health.resolved') }} @else {{ __('super.logs_health.unresolved') }} @endif

{{ __('super.logs_health.empty_title') }}

{{ __('super.logs_health.empty_subtitle') }}

@if($logs->hasPages())
{{ $logs->links() }}
@endif
@endsection @push('scripts') @endpush