@extends('layouts.app') @section('title', 'Health Check') @section('content')
Device Health
{{ $online }} Online {{ $offline }} Offline {{ collect($results)->where('device.last_status', null)->count() }} Unknown
@foreach($results as $r) @php $device = $r['device']; $statusClass = $device->last_status === 'online' ? 'success' : ($device->last_status === 'offline' ? 'danger' : 'secondary'); @endphp
{{ $device->name }}
{{ $device->ip_address }}:{{ $device->port }} @if($device->location)
{{ $device->location }}
@endif
{{ strtoupper($device->last_status ?? 'UNKNOWN') }}
Latency
Last Mode
@if($device->last_sent_mode) {{ strtoupper($device->last_sent_mode) }} @else @endif
{{ $r['message'] }}
@if($device->last_seen_at)
Last seen: {{ $device->last_seen_at->diffForHumans() }}
@endif
Send
@endforeach
{{-- Summary table --}}
Summary
@foreach($results as $r) @php $d = $r['device']; @endphp @endforeach
DeviceIPStatusLatencyMessageLast SeenLast Sent
{{ $d->name }} {{ $d->ip_address }} {{ strtoupper($d->last_status ?? 'UNKNOWN') }} {{ $r['message'] }} {{ $d->last_seen_at?->diffForHumans() ?? '—' }} @if($d->last_sent_mode) {{ strtoupper($d->last_sent_mode) }} {{ $d->last_sent_at?->format('d/m H:i') }} @else @endif
@endsection @push('scripts') @endpush