@if(!$status) {{-- Show loading placeholder if status is not yet loaded --}}
{{ $server->service->product->name ?? 'Server' }}
@if($loadAttempts < 3) Loading... ({{ $loadAttempts }}/3) @else Failed to load @endif
IPv4 Address {{ $server->primaryIpv4->ip ?? 'None' }}
IPv6 Address {{ $server->primaryIpv6->ip ?? 'None' }}
@if($loadAttempts >= 3)
Unable to fetch server status from Proxmox.
@endif
@else
@if($server->user_set_icon) @php $iconColor = $server->user_set_icon_color ?? '#6366f1'; // Calculate a lighter background color (20% opacity of the icon color) $bgColor = $iconColor . '33'; // 33 in hex = 20% opacity // Build the full component name with prefix $iconPrefix = $server->user_set_icon_prefix ?? 'ri'; $iconName = $server->user_set_icon; $componentName = $iconPrefix . '-' . $iconName; @endphp
@else
@endif {{ $status->name }}
@if($status->status == 'running') @elseif($status->status == 'stopped') @else @endif
@if($status->status == 'running') Running @elseif($status->status == 'stopped') Stopped @else {{ ucfirst($status->status) }} @endif
{{-- Server Tags - Separate row for better mobile layout --}} @if($server->tag1 || $server->tag2 || $server->tag3)
@if($server->tag1) {{ $server->tag1 }} @endif @if($server->tag2) {{ $server->tag2 }} @endif @if($server->tag3) {{ $server->tag3 }} @endif
@endif
IPv4 Address {{ $server->primaryIpv4->ip ?? 'None' }}
IPv6 Address {{ $server->primaryIpv6->ip ?? 'None' }}
@if($status->status == 'running' && isset($status->uptime))
Uptime @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) }}
@endif @if($status->status == 'running') @endif
{{-- Server Configuration Statistics --}}
Server Configuration
CPU Cores
{{ $status->cpus ?? 'N/A' }} {{ ($status->cpus ?? 0) > 1 ? 'Cores' : 'Core' }}
RAM Allocation
{{ round(($status->maxmem ?? 0) / (1024 * 1024 * 1024), 2) }} GiB
Disk Capacity
{{ Illuminate\Support\Number::fileSize(bytes: $status->maxdisk ?? 0) }}
Bandwidth
{{ $this->monthlyTraffic }} / {{ $this->bandwidthThreshold95 }} GiB @php $bwPercent = $this->bandwidthThreshold95 > 0 ? min(100, round(($this->monthlyTraffic / $this->bandwidthThreshold95) * 100, 1)) : 0; @endphp
95th percentile threshold · {{ $bwPercent }}% used
@endif