Files
coolify/resources/views/livewire/fleet/_usage-cell.blade.php
T
Aditya Tripathi ab436942c9 feat(metrics): polish fleet + server metrics UI/UX
Refine the /metrics fleet page and align the per-server metrics page with it.

Fleet overview:
- add live sparklines to the CPU/Memory/Disk/Network KPI tiles (shared axis,
  capped to ~40 points per sparkline)
- fill the Servers online + Containers tiles (fleet-health bar, hottest
  container) so all six tiles read as one system
- scope-aware labels: drop the "Fleet" prefix and helper copy when a single
  server is selected

Trend charts:
- hero layout: CPU spans full width, the other four form a 2x2 grid
- apply the same hero layout + skeleton to the per-server page for consistency

Hottest containers table:
- add a rank column and a per-row magnitude bar scaled to the busiest container
- fix a leaked Blade @break directive that rendered literally and forced
  horizontal scroll on the Network tab
- keep the value column a fixed width so bars align across rows

Live refresh:
- add analytics-style loading feedback to the range tabs and server filter
- stable wire:key on table rows + width transitions on bars so data glides
  on live refresh instead of snapping

Generalize the shared _sparkline partial (optional color/label/format) so it
serves non-traffic metrics without changing analytics behaviour.
2026-09-17 06:30:59 +00:00

13 lines
666 B
PHP

@php
$level = \App\Support\Metrics\PressureLevel::for($percent, $kind);
$width = $percent === null ? 0 : min(100, round($percent, 1));
@endphp
<div class="flex items-center gap-2">
<span class="tabular-nums {{ \App\Support\Metrics\PressureLevel::textClass($level) }}">
{{ $percent === null ? '-' : round($percent).'%' }}
</span>
<div class="hidden h-1 w-16 shrink-0 overflow-hidden rounded-full bg-neutral-100 sm:block dark:bg-white/[0.06]">
<div class="h-full rounded-full transition-[width] duration-700 ease-out {{ \App\Support\Metrics\PressureLevel::barClass($level) }}" style="width: {{ $width }}%;"></div>
</div>
</div>