2025-11-19 09:54:51 +00:00
|
|
|
@php
|
2025-11-20 16:31:07 +00:00
|
|
|
// Transform colon format to human-readable format for UI display
|
|
|
|
|
// running:healthy → Running (healthy)
|
|
|
|
|
// running:unhealthy:excluded → Running (unhealthy, excluded)
|
|
|
|
|
// exited:excluded → Exited (excluded)
|
2025-11-19 09:54:51 +00:00
|
|
|
$isExcluded = str($complexStatus)->endsWith(':excluded');
|
2025-11-20 16:31:07 +00:00
|
|
|
$parts = explode(':', $complexStatus);
|
|
|
|
|
|
|
|
|
|
if ($isExcluded) {
|
|
|
|
|
if (count($parts) === 3) {
|
|
|
|
|
// Has health status: running:unhealthy:excluded → Running (unhealthy, excluded)
|
|
|
|
|
$displayStatus = str($parts[0])->headline() . ' (' . $parts[1] . ', excluded)';
|
|
|
|
|
} else {
|
|
|
|
|
// No health status: exited:excluded → Exited (excluded)
|
|
|
|
|
$displayStatus = str($parts[0])->headline() . ' (excluded)';
|
|
|
|
|
}
|
|
|
|
|
} elseif (count($parts) >= 2 && !str($complexStatus)->startsWith('Proxy')) {
|
|
|
|
|
// Regular colon format: running:healthy → Running (healthy)
|
|
|
|
|
$displayStatus = str($parts[0])->headline() . ' (' . $parts[1] . ')';
|
|
|
|
|
} else {
|
|
|
|
|
// No transformation needed (simple status or already in parentheses format)
|
|
|
|
|
$displayStatus = str($complexStatus)->headline();
|
|
|
|
|
}
|
2025-11-19 09:54:51 +00:00
|
|
|
@endphp
|
2025-11-20 16:31:07 +00:00
|
|
|
@if (str($displayStatus)->lower()->contains('running'))
|
2025-11-19 09:54:51 +00:00
|
|
|
<x-status.running :status="$displayStatus" />
|
2025-11-20 16:31:07 +00:00
|
|
|
@elseif(str($displayStatus)->lower()->contains('starting'))
|
2025-11-19 09:54:51 +00:00
|
|
|
<x-status.restarting :status="$displayStatus" />
|
2025-11-20 16:31:07 +00:00
|
|
|
@elseif(str($displayStatus)->lower()->contains('restarting'))
|
2025-11-19 09:54:51 +00:00
|
|
|
<x-status.restarting :status="$displayStatus" />
|
2025-11-20 16:31:07 +00:00
|
|
|
@elseif(str($displayStatus)->lower()->contains('degraded'))
|
2025-11-19 09:54:51 +00:00
|
|
|
<x-status.degraded :status="$displayStatus" />
|
2023-09-21 15:48:31 +00:00
|
|
|
@else
|
2025-11-19 09:54:51 +00:00
|
|
|
<x-status.stopped :status="$displayStatus" />
|
|
|
|
|
@endif
|
2024-02-16 21:15:18 +00:00
|
|
|
@if (!str($complexStatus)->contains('exited') && $showRefreshButton)
|
2025-10-24 10:58:52 +00:00
|
|
|
<button wire:loading.remove.delay.shortest wire:target="manualCheckStatus" title="Refresh Status" wire:click='manualCheckStatus'
|
2025-05-19 19:50:32 +00:00
|
|
|
class="mx-1 dark:hover:fill-white fill-black dark:fill-warning">
|
2023-12-11 12:43:16 +00:00
|
|
|
<svg class="w-4 h-4" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
|
<path
|
|
|
|
|
d="M12 2a10.016 10.016 0 0 0-7 2.877V3a1 1 0 1 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2H6.218A7.98 7.98 0 0 1 20 12a1 1 0 0 0 2 0A10.012 10.012 0 0 0 12 2zm7.989 13.5h-4.5a1 1 0 0 0 0 2h2.293A7.98 7.98 0 0 1 4 12a1 1 0 0 0-2 0a9.986 9.986 0 0 0 16.989 7.133V21a1 1 0 0 0 2 0v-4.5a1 1 0 0 0-1-1z" />
|
|
|
|
|
</svg>
|
|
|
|
|
</button>
|
2025-10-24 10:58:52 +00:00
|
|
|
<button wire:loading.delay.shortest wire:target="manualCheckStatus" title="Refreshing Status" wire:click='manualCheckStatus'
|
2025-06-26 10:23:08 +00:00
|
|
|
class="mx-1 dark:hover:fill-white fill-black dark:fill-warning">
|
|
|
|
|
<svg class="w-4 h-4 animate-spin" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
|
<path
|
|
|
|
|
d="M12 2a10.016 10.016 0 0 0-7 2.877V3a1 1 0 1 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2H6.218A7.98 7.98 0 0 1 20 12a1 1 0 0 0 2 0A10.012 10.012 0 0 0 12 2zm7.989 13.5h-4.5a1 1 0 0 0 0 2h2.293A7.98 7.98 0 0 1 4 12a1 1 0 0 0-2 0a9.986 9.986 0 0 0 16.989 7.133V21a1 1 0 0 0 2 0v-4.5a1 1 0 0 0-1-1z" />
|
|
|
|
|
</svg>
|
|
|
|
|
</button>
|
2023-12-11 12:43:16 +00:00
|
|
|
@endif
|