feat: add uptime display and enhance server configuration section with icons for improved readability and user experience
This commit is contained in:
@@ -33,6 +33,29 @@
|
||||
<span class="text-xs text-base/50">IPv6 Address</span>
|
||||
<span class="text-base">{{ $server->primaryIpv6->ip }}</span>
|
||||
</div>
|
||||
@if($status->status == 'running' && isset($status->uptime))
|
||||
<div class="flex flex-col">
|
||||
<span class="text-xs text-base/50">Uptime</span>
|
||||
<span class="text-base">
|
||||
@php
|
||||
$uptime = $status->uptime;
|
||||
$days = floor($uptime / 86400);
|
||||
$hours = floor(($uptime % 86400) / 3600);
|
||||
$minutes = floor(($uptime % 3600) / 60);
|
||||
|
||||
$uptimeStr = '';
|
||||
if ($days > 0) {
|
||||
$uptimeStr .= $days . 'd ';
|
||||
}
|
||||
if ($hours > 0 || $days > 0) {
|
||||
$uptimeStr .= $hours . 'h ';
|
||||
}
|
||||
$uptimeStr .= $minutes . 'm';
|
||||
@endphp
|
||||
{{ trim($uptimeStr) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
<div class="hidden sm:flex flex-col">
|
||||
<span class="text-xs text-base/50">Memory</span>
|
||||
<span class="text-base">
|
||||
@@ -61,22 +84,33 @@
|
||||
<div class="text-sm font-medium text-base/70 mb-3">Server Configuration</div>
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
<div class="flex flex-col">
|
||||
<span class="text-xs text-base/50">CPU Cores</span>
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<x-ri-cpu-line class="size-4 text-base/50" />
|
||||
<span class="text-xs text-base/50">CPU Cores</span>
|
||||
</div>
|
||||
<span class="text-base">{{ $status->cpus ?? 'N/A' }} {{ ($status->cpus ?? 0) > 1 ? 'Cores' : 'Core' }}</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="text-xs text-base/50">RAM Allocation</span>
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<x-ri-database-2-line class="size-4 text-base/50" />
|
||||
<span class="text-xs text-base/50">RAM Allocation</span>
|
||||
</div>
|
||||
<span class="text-base">{{ round(($status->maxmem ?? 0) / (1024 * 1024 * 1024), 2) }} GiB</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="text-xs text-base/50">Disk Capacity</span>
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<x-ri-hard-drive-2-line class="size-4 text-base/50" />
|
||||
<span class="text-xs text-base/50">Disk Capacity</span>
|
||||
</div>
|
||||
<span class="text-base">{{ Illuminate\Support\Number::fileSize(bytes: $status->maxdisk ?? 0) }}</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="text-xs text-base/50">Bandwidth</span>
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<x-ri-speed-line class="size-4 text-base/50" />
|
||||
<span class="text-xs text-base/50">Bandwidth</span>
|
||||
</div>
|
||||
<span class="text-base text-xs leading-relaxed">
|
||||
Fair Use, Unmetered.<br>
|
||||
<span class="text-base/60">Throttled after exceeding 95% standard of average of all users combined. This implements fair throttling for QoS. Throttled at that point to 1MiB/s.</span>
|
||||
Connection reduced to 1 MiB/s if account's data usage exceeds network's 95% threshold.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user