@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; // static sparkline path from $metrics (live chart island replaces this in v1) $n = count($metrics); $w = 300; $h = 80; $pad = 6; $coords = []; foreach ($metrics as $i => $v) { $x = $n > 1 ? round($i / ($n - 1) * $w, 1) : 0; $y = round($h - $pad - ($v / 100) * ($h - 2 * $pad), 1); $coords[] = "$x,$y"; } $line = implode(' ', $coords); $area = "0,$h " . $line . " $w,$h"; $svcLabel = ['online' => 'aktiv', 'warning' => 'degradiert', 'offline' => 'gestoppt']; @endphp
Flotte
Mock-Serie — Live-Daten folgen über Reverb.
{{ $svc['name'] }}
{{ $svc['desc'] }}
{{ $e['actor'] }} · {{ $e['action'] }}
{{ $e['target'] }}