{{-- One card per lab PC listener (refreshed every 60 s by index.blade.php). Times from the listener are lab-local strings, shown as sent; "last heartbeat" is the server's own time. --}} @php $v = fn ($x) => is_scalar($x) && trim((string) $x) !== '' ? (string) $x : '—'; @endphp
@forelse ($listeners as $l) @php $s = $l->status ?? []; [$label, $color, $detail] = $l->state(); $ips = collect((array) ($s['local_ips'] ?? []))->filter()->implode(', '); $analyzers = collect((array) ($s['analyzers'] ?? []))->filter(fn ($a) => is_array($a)); $log = collect((array) ($s['log'] ?? []))->map(fn ($x) => (string) $x); $error = trim((string) ($s['last_error'] ?? '')); @endphp
{{ $l->device }}
{{ $l->computer }} · listener {{ $v($l->version) }}
{{ $label }}
@if ($detail)
{{ $detail }}
@endif
Last heartbeat {{ $l->last_seen_at ? local_time($l->last_seen_at, 'd M Y, h:i:s A') : '—' }} ({{ $l->last_seen_at?->diffForHumans() ?? 'never' }})
Lab PC IP : port {{ $ips ?: '—' }} : {{ $v($s['port'] ?? null) }} @if (($s['listening'] ?? true) === false)not listening@endif
Results waiting to send {{ (int) ($s['pending'] ?? 0) }}
Last result {{ $v($s['last_message_at'] ?? null) }}@if (!empty($s['last_sample_id'])) · sample {{ $s['last_sample_id'] }}@endif
Last sent to the server{{ $v($s['last_sent_at'] ?? null) }}
Received / sent {{ (int) ($s['received'] ?? 0) }} / {{ (int) ($s['sent'] ?? 0) }} since {{ $v($s['started_at'] ?? null) }}
Last error {{ $error !== '' ? $error : 'none' }}@if ($error !== '' && !empty($s['last_error_at']))
{{ $s['last_error_at'] }}
@endif
Connected analyzers
@if ($analyzers->isEmpty())
None connected.
@else @foreach ($analyzers as $a) @endforeach
AnalyzerConnected sinceLast data
{{ $v($a['peer'] ?? null) }}{{ $v($a['since'] ?? null) }}{{ $v($a['last_data'] ?? null) }}
@endif
Log ({{ $log->count() }} lines) {{-- escaped by {{ }} --}}
{{ $log->implode("\n") ?: 'No log lines.' }}
@empty
No listener has reported yet. Start bogsiiye-listener.exe on the lab PC with this server's address and the analyzer key; it appears here within a minute.
@endforelse