@extends('admin.layouts.admin') @section('content') @php $status = $monitor->forced_status ?: ($monitor->last_status ?: 'down'); $label = match($status) { 'ok' => 'En ligne', 'degraded' => 'Dégradé', 'maintenance' => 'Maintenance', default => 'Hors ligne', }; $pill = match($status) { 'ok' => 'background:#10b981;color:#fff;', 'degraded' => 'background:#fbbf24;color:#0f172a;', 'maintenance' => 'background:#0ea5e9;color:#fff;', default => 'background:#f43f5e;color:#fff;', }; $slotClass = function(string $s) { return match($s) { 'ok' => 'background:#10b981;', 'degraded' => 'background:#fbbf24;', 'maintenance' => 'background:#0ea5e9;', 'down' => 'background:#f43f5e;', default => 'background:rgba(148,163,184,.28);', }; }; @endphp
{{-- Header card --}}
{{ $monitor->name }}
Catégorie : {{ $monitor->category?->name ?? '-' }} • Type : {{ $monitor->type }} • Interval : {{ $monitor->interval_sec }}s
Cible : {{ $monitor->target }}
{{ $label }}
{{-- 1H bar --}}
@foreach($slots as $slot)
@endforeach
1h Maintenant
Vérification toutes les {{ (int)$monitor->interval_sec }} secondes ({{ max(1, (int) round($monitor->interval_sec / 60)) }} minutes)
{{ $label }}
{{-- Details --}}
Dernier check
@if($monitor->last_checked_at)
{{ $monitor->last_checked_at->diffForHumans() }}
{{ $monitor->last_checked_at }}
@else
Jamais
@endif
Mesures
Réponse : {{ $monitor->last_response_time_ms ? $monitor->last_response_time_ms.'ms' : '-' }}
HTTP : {{ $monitor->last_http_code ?: '-' }}
Timeout : {{ $monitor->timeout_ms }}ms
Seuil dégradé : {{ $monitor->degraded_threshold_ms }}ms
État
Actif : {{ $monitor->is_active ? 'Oui' : 'Non' }}
Statut forcé : {{ $monitor->forced_status ?: 'Aucun' }}
@if($monitor->last_error)
Erreur : {{ $monitor->last_error }}
@endif
{{-- Bottom actions (mobile + general) --}}
Retour Modifier
@endsection