@extends('admin.layout') @section('title', __('admin.nav.dashboard').' · '.__('admin.brand')) @section('content')
COASTER WORLD DATA

{{ __('admin.dashboard.title') }}

{{ __('admin.dashboard.subtitle') }}

@if (config('data.population_enabled'))
@csrf
@else {{ __('admin.platform.population_title') }} · {{ __('admin.platform.locked') }} @endif
@foreach ([ ['resorts', 'dashboard.resorts', '◈'], ['parks', 'dashboard.parks', '◎'], ['attractions', 'dashboard.attractions', '⌁'], ['pois', 'dashboard.pois', '◇'], ['sources', 'dashboard.active_sources', '↻'], ['pending_mappings', 'dashboard.pending_mappings', '↔'], ['open_conflicts', 'dashboard.open_conflicts', '!'], ] as [$key, $label, $icon])
{{ number_format($counts[$key], 0, ',', ' ') }}{{ __('admin.'.$label) }}
@endforeach

{{ __('admin.dashboard.provider_health') }}

{{ __('admin.dashboard.provider_health_hint') }}

{{ __('admin.view_all') }}
@if ($providerHealth->isEmpty())
{{ __('admin.dashboard.no_provider_health') }}
@else
@foreach ($providerHealth as $health) @endforeach
{{ __('admin.source') }}{{ __('admin.scope') }}{{ __('admin.status') }}{{ __('admin.last_success') }}{{ __('admin.failures') }}{{ __('admin.response_time') }}
{{ $health->source?->name ?? '—' }} {{ $health->scope }} {{ __('admin.statuses.'.$health->status) }} {{ $health->last_success_at?->diffForHumans() ?? '—' }} {{ $health->consecutive_failures }} {{ $health->average_response_ms !== null ? $health->average_response_ms.' ms' : '—' }}
@endif

{{ __('admin.dashboard.recent_fetches') }}

{{ __('admin.dashboard.recent_fetches_hint') }}

@forelse ($recentFetches as $fetch)
{{ $fetch->source?->name ?? '—' }}{{ $fetch->fetch_type }}
{{ __('admin.statuses.'.$fetch->status) }}{{ $fetch->started_at?->diffForHumans() }}
@empty
{{ __('admin.dashboard.no_fetches') }}
@endforelse

{{ __('admin.dashboard.pending_mappings') }}

{{ __('admin.dashboard.pending_mappings_hint') }}

{{ __('admin.view_all') }}
@forelse ($pendingMappings as $mapping)
{{ $mapping->external_name ?: $mapping->external_id }}{{ $mapping->source?->name }} · {{ $mapping->entity_type }}{{ $mapping->entity?->name ?? '#'.$mapping->entity_id }}
@empty
{{ __('admin.dashboard.no_pending_mappings') }}
@endforelse

{{ __('admin.dashboard.open_conflicts') }}

{{ __('admin.dashboard.open_conflicts_hint') }}

{{ __('admin.view_all') }}
@forelse ($openConflicts as $conflict)
{{ $conflict->entity?->name ?? $conflict->entity_type.' #'.$conflict->entity_id }}{{ $conflict->field_key }}{{ __('admin.severities.'.$conflict->severity) }}
@empty
{{ __('admin.dashboard.no_conflicts') }}
@endforelse
@endsection