From 76451fa0adb115d63355c70aedf22e39060d75ad Mon Sep 17 00:00:00 2001 From: SaurFort <97303132+SaurFort@users.noreply.github.com> Date: Sun, 31 Aug 2025 13:51:27 +0200 Subject: [PATCH] fix: Wrong conversion if decimal prefix selected (#1626) Co-authored-by: Boy132 --- app/Filament/Server/Widgets/ServerOverview.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Filament/Server/Widgets/ServerOverview.php b/app/Filament/Server/Widgets/ServerOverview.php index 2472d54c6..69b812fcd 100644 --- a/app/Filament/Server/Widgets/ServerOverview.php +++ b/app/Filament/Server/Widgets/ServerOverview.php @@ -67,7 +67,7 @@ class ServerOverview extends StatsOverviewWidget } $latestMemoryUsed = collect(cache()->get("servers.{$this->server->id}.memory_bytes"))->last(default: 0); - $totalMemory = $this->server->memory * 2 ** 20; + $totalMemory = $this->server->memory * (config('panel.use_binary_prefix') ? 1024 * 1024 : 1000 * 1000); $used = convert_bytes_to_readable($latestMemoryUsed); $total = convert_bytes_to_readable($totalMemory);