@php $friendlySize = function(int $mb, int $precision = 0) { if ($mb >= 1024 * 1024) { return round($mb / 1024 / 1024, $precision) . 'TB'; } if ($mb >= 1024) { return round($mb / 1024, $precision) . 'GB'; } return round($mb, $precision) . 'MB'; }; $cols = ! empty($cols) ? $cols : 'full'; $rows = ! empty($rows) ? $rows : 1; @endphp
@if ($servers->isNotEmpty())
CPU
Memory
Storage
@foreach ($servers as $slug => $server)
@if ($server->recently_reported)
@else @endif
{{ $server->name }}
{{ $server->cpu_current }}%
{{ $friendlySize($server->memory_current, 1) }} / {{ $friendlySize($server->memory_total, 1) }}
@foreach ($server->storage as $storage)
{{ $friendlySize($storage->used) }} / {{ $friendlySize($storage->total) }}
@endforeach
@endforeach
@endif
@script @endscript