mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-28 19:01:07 +02:00
Tweak Grid View, Use Memory Limit, not wings reported allocation (#1462)
This commit is contained in:
parent
7731f16b0f
commit
6a088d0c4f
@ -68,7 +68,7 @@ class ServerOverview extends StatsOverviewWidget
|
|||||||
}
|
}
|
||||||
|
|
||||||
$latestMemoryUsed = collect(cache()->get("servers.{$this->server->id}.memory_bytes"))->last(default: 0);
|
$latestMemoryUsed = collect(cache()->get("servers.{$this->server->id}.memory_bytes"))->last(default: 0);
|
||||||
$totalMemory = collect(cache()->get("servers.{$this->server->id}.memory_limit_bytes"))->last(default: 0);
|
$totalMemory = $this->server->memory * 2 ** 20;
|
||||||
|
|
||||||
$used = convert_bytes_to_readable($latestMemoryUsed);
|
$used = convert_bytes_to_readable($latestMemoryUsed);
|
||||||
$total = convert_bytes_to_readable($totalMemory);
|
$total = convert_bytes_to_readable($totalMemory);
|
||||||
|
@ -24,7 +24,7 @@ class ServerEntry extends Component
|
|||||||
style="background-color: #D97706;">
|
style="background-color: #D97706;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1 dark:bg-gray-800 dark:text-white rounded-lg overflow-hidden p-3">
|
<div class="flex-1 dark:bg-gray-850 dark:text-white rounded-lg overflow-hidden p-2">
|
||||||
<div class="flex items-center mb-5 gap-2">
|
<div class="flex items-center mb-5 gap-2">
|
||||||
<x-filament::loading-indicator class="h-5 w-5" />
|
<x-filament::loading-indicator class="h-5 w-5" />
|
||||||
<h2 class="text-xl font-bold">
|
<h2 class="text-xl font-bold">
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
style="background-color: {{ $server->condition->getColor(true) }};">
|
style="background-color: {{ $server->condition->getColor(true) }};">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1 dark:bg-gray-800 dark:text-white rounded-lg overflow-hidden p-3">
|
<div class="flex-1 dark:bg-gray-850 dark:text-white rounded-t-lg overflow-hidden p-2">
|
||||||
<div class="flex items-center mb-5 gap-2">
|
<div class="flex items-center mb-5 gap-2">
|
||||||
<x-filament::icon-button
|
<x-filament::icon-button
|
||||||
:icon="$server->condition->getIcon()"
|
:icon="$server->condition->getIcon()"
|
||||||
@ -47,9 +47,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<x-filament-tables::actions
|
<div class="flex-1 dark:bg-gray-850 dark:text-white rounded-b-lg overflow-hidden p-1">
|
||||||
:actions="\App\Filament\App\Resources\ServerResource\Pages\ListServers::getPowerActions()"
|
<x-filament-tables::actions
|
||||||
:alignment="\Filament\Support\Enums\Alignment::Center"
|
:actions="\App\Filament\App\Resources\ServerResource\Pages\ListServers::getPowerActions()"
|
||||||
:record="$server"
|
:alignment="\Filament\Support\Enums\Alignment::Center"
|
||||||
/>
|
:record="$server"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
x
Reference in New Issue
Block a user