@php $svcLabel = ['online' => __('dashboard.svc_online'), 'warning' => __('dashboard.svc_warning'), 'offline' => __('dashboard.svc_offline')]; // Build SVG polyline paths from the real CPU/MEM history series (cache-backed, polled). $chart = function (array $s) { $w = 300; $h = 100; $pad = 6; $n = count($s); $pts = []; foreach ($s as $i => $v) { $x = $n > 1 ? round($i / ($n - 1) * $w, 2) : 0; $y = round($h - $pad - ($v / 100) * ($h - 2 * $pad), 2); $pts[] = "$x,$y"; } $line = implode(' ', $pts); return ['line' => $line, 'area' => "0,$h ".$line." $w,$h"]; }; $cpuP = $chart($cpuSeries); $memP = $chart($memSeries); @endphp
{{-- Header --}}
@if ($active)

{{ $active->name }}

@else

@endif

{{ __('dashboard.heading') }}

@if ($active) {{ $active->ip }} @else @endif
{{-- KPI tiles with sparklines (active server) --}}
{{-- Big dual-series chart --}} CPU MEM Live
{{-- Y axis --}}
100 75 50 25 0
{{ __('dashboard.axis_minus_15min') }}-10-5{{ __('dashboard.axis_now') }}
{{-- systemd table + audit --}}
@if (! $ready) @for ($i = 0; $i < 5; $i++) @endfor @else @forelse ($services as $svc) @empty @endforelse @endif
Unit Status {{ __('dashboard.col_state') }}

{{ $svc['name'] }}

{{ $svc['desc'] }}

{{ $svcLabel[$svc['status']] }} {{ $svc['sub'] }}
{{ __('dashboard.no_service_data') }}
@forelse ($events as $e)
$e->is_error, 'bg-raised text-ink-3' => ! $e->is_error, ])>

{{ $e->actor }} · $e->is_error, 'text-ink' => ! $e->is_error])>{{ $e->action_label }}

{{ $e->target }}

{{ $e->created_at->diffForHumans(null, true) }}
@empty

{{ __('dashboard.no_events') }}

@endforelse