@props([ 'status' => 'Restarting', 'title' => null, 'lastDeploymentLink' => null, 'noLoading' => false, ]) @php // Handle both colon format (backend) and parentheses format (from services.blade.php) // starting:unknown → Starting (unknown) // starting (unknown) → starting (unknown) (already formatted, display as-is) if (str($status)->contains('(')) { // Already in parentheses format from services.blade.php - use as-is $displayStatus = $status; $healthStatus = str($status)->after('(')->before(')')->trim()->value(); } elseif (str($status)->contains(':') && !str($status)->startsWith('Proxy')) { // Colon format from backend - transform it $parts = explode(':', $status); $displayStatus = str($parts[0])->headline(); $healthStatus = $parts[1] ?? null; } else { // Simple status without health $displayStatus = str($status)->headline(); $healthStatus = null; } @endphp
@if (!$noLoading) @endif
@if ($lastDeploymentLink) {{ $displayStatus }} @else {{ $displayStatus }} @endif
@if ($healthStatus && !str($displayStatus)->contains('('))
({{ $healthStatus }})
@endif