@php $total = count($servers); $online = collect($servers)->where('status', 'online')->count(); $avgCpu = $total ? (int) round(collect($servers)->avg('cpu')) : 0; $avgMem = $total ? (int) round(collect($servers)->avg('mem')) : 0; $svcLabel = ['online' => 'aktiv', 'warning' => 'degradiert', 'offline' => 'gestoppt']; $web = collect($servers)->firstWhere('name', 'web-01') ?? ($servers[0] ?? ['cpu' => 0, 'mem' => 0]); $disk = 71; // mock until the SSH layer reports real disk usage $ringTone = fn (int $v): string => $v >= 90 ? 'offline' : ($v >= 75 ? 'warning' : 'online'); @endphp
Flotte
· CPU
{{ $svc['name'] }}
{{ $svc['desc'] }}
{{ $e['actor'] }} · {{ $e['action'] }}
{{ $e['target'] }}