@php $data = $this->getData(); $cpu = $data['cpu'] ?? []; $memory = $data['memory'] ?? []; $disk = $data['disk'] ?? []; $partitions = $disk['partitions'] ?? []; $load = $data['load'] ?? []; $uptime = $data['uptime'] ?? 'N/A'; $cpuUsage = $cpu['usage'] ?? 0; $memUsage = $memory['usage'] ?? 0; // Memory values are in MB from agent $memUsedGB = ($memory['used'] ?? 0) / 1024; $memTotalGB = ($memory['total'] ?? 0) / 1024; $partition = $partitions[0] ?? null; $diskUsage = $partition ? round($partition['usage_percent'] ?? 0, 1) : 0; $mountPoint = $partition['mount'] ?? '/'; $usedHuman = $partition['used_human'] ?? '0 B'; $totalHuman = $partition['total_human'] ?? '0 B'; @endphp {{-- Main Charts Grid (3 columns) --}}
{{-- CPU Usage Chart --}}
{{ __('CPU Usage') }}
{{ $cpu['cores'] ?? 0 }} {{ __('cores') }} ยท {{ __('Load') }}: {{ $load['1min'] ?? 0 }} / {{ $load['5min'] ?? 0 }} / {{ $load['15min'] ?? 0 }}
{{-- Memory Usage Chart --}}
{{ __('Memory') }}
{{ number_format($memUsedGB, 1) }} GB {{ __('used') }} / {{ number_format($memTotalGB, 1) }} GB {{ __('total') }}
{{-- Disk Usage Chart --}} @if($partition)
{{ __('Disk') }} {{ $mountPoint }}
{{ $usedHuman }} {{ __('used') }} / {{ $totalHuman }} {{ __('total') }}
@endif