mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 06:24:44 +02:00

* Update Server Listing * Update Edit/Create Server Pages Re-arrange limits, CPU->Memory->Disk * Remove auto focus its cancer on mobile... * Hide Title, Quick yaml fix * Hide columns on mobile * Hide backup locked on mobile * Fix schedules for mobile * Hide Notes on mobile * Consolidate and clean these up * Simplify * Remove unused imports * Replace tabler icon package * Update app/Filament/Server/Resources/FileResource/Pages/EditFiles.php Co-authored-by: Lance Pioch <git@lance.sh> * Allow the unit to be changed * Use existing method * Update composer and pint * Update resources/views/tables/columns/server-entry-column.blade.php Co-authored-by: Boy132 <Boy132@users.noreply.github.com> * Simplify html and add small margin * Unused * Add enum --------- Co-authored-by: Lance Pioch <git@lance.sh> Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
68 lines
2.7 KiB
PHP
68 lines
2.7 KiB
PHP
@php
|
|
use App\Enums\ServerResourceType;
|
|
|
|
/** @var \App\Models\Server $server */
|
|
$server = $getRecord();
|
|
@endphp
|
|
|
|
<head>
|
|
<style>
|
|
hr {
|
|
border-color: #9ca3af;
|
|
}
|
|
</style>
|
|
</head>
|
|
<div class="w-full">
|
|
<!-- Wrapper for Positioning -->
|
|
<div class="relative flex">
|
|
<!-- Status Strip Outside the Box -->
|
|
<div
|
|
class="absolute left-0 top-1 bottom-0 w-1 rounded-lg"
|
|
style="background-color: {{ $server->conditionColorHex() }};">
|
|
</div>
|
|
|
|
<!-- Card Component -->
|
|
<div class="flex-1 bg-gray-800 text-white rounded-lg overflow-hidden p-3">
|
|
<!-- Header -->
|
|
<div class="flex items-center mb-5 gap-2">
|
|
<x-filament::icon-button
|
|
:icon="$server->conditionIcon()"
|
|
:color="$server->conditionColor()"
|
|
:tooltip="\Illuminate\Support\Str::title($server->condition)"
|
|
size="xl"
|
|
/>
|
|
<h2 class="text-xl font-bold">
|
|
{{ $server->name }}
|
|
<span class="text-gray-400">({{ $server->formatResource('uptime', type: ServerResourceType::Time) }})</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<!-- Resource Usage -->
|
|
<div class="flex justify-between text-center">
|
|
<div>
|
|
<p class="text-sm text-gray-400">CPU</p>
|
|
<p class="text-md font-semibold">{{ $server->formatResource('cpu_absolute', type: ServerResourceType::Percentage) }}</p>
|
|
<hr class="p-0.5">
|
|
<p class="text-xs text-gray-400">{{ $server->formatResource('cpu', type: ServerResourceType::Percentage, limit: true) }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-sm text-gray-400">Memory</p>
|
|
<p class="text-md font-semibold">{{ $server->formatResource('memory_bytes') }}</p>
|
|
<hr class="p-0.5">
|
|
<p class="text-xs text-gray-400">{{ $server->formatResource('memory', limit: true) }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-sm text-gray-400">Disk</p>
|
|
<p class="text-md font-semibold">{{ $server->formatResource('disk_bytes') }}</p>
|
|
<hr class="p-0.5">
|
|
<p class="text-xs text-gray-400">{{ $server->formatResource('disk', limit: true) }}</p>
|
|
</div>
|
|
<div class="hidden sm:block">
|
|
<p class="text-sm text-gray-400">Network</p>
|
|
<p class="text-md font-semibold">{{ $server->allocation->address }} </p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|