{{-- Server Card Component - Task History Theme --}}
@if($status)
{{-- Header: Server Name & Status --}}
@if($server->user_set_icon) @php $iconColor = $server->user_set_icon_color ?? '#6366f1'; $bgColor = $iconColor . '20'; $iconPrefix = $server->user_set_icon_prefix ?? 'ri'; $iconName = $server->user_set_icon; $componentName = $iconPrefix . '-' . $iconName; @endphp
@else
@endif {{ $status->name }}
{{-- Quick Info Row --}}
IPv4 {{ $server->primaryIpv4->ip ?? 'None' }}
IPv6 {{ $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 Grid --}}
Configuration
CPU
{{ ($status->cpus ?? 'N/A') . ' Core' . (($status->cpus ?? 0) > 1 ? 's' : '') }}
RAM
{{ round(($status->maxmem ?? 0) / (1024 * 1024 * 1024), 1) }} GiB
Disk
{{ Illuminate\Support\Number::fileSize(bytes: $status->maxdisk ?? 0) }}
Bandwidth
{{ $this->monthlyTraffic }} GiB

of {{ $this->bandwidthThreshold95 }} GiB (95%)

@else {{-- Error State --}}
{{ $server->hostname ?? 'Server #' . $server->id }}
Unavailable

Unable to retrieve server status.

@endif