2023-07-28 19:36:19 +00:00
|
|
|
@props([
|
2023-09-22 13:29:19 +00:00
|
|
|
'status' => 'Restarting',
|
2024-10-22 08:58:23 +00:00
|
|
|
'title' => null,
|
2024-05-17 06:53:25 +00:00
|
|
|
'lastDeploymentLink' => null,
|
2024-10-03 19:29:55 +00:00
|
|
|
'noLoading' => false,
|
2023-07-28 19:36:19 +00:00
|
|
|
])
|
2025-11-20 16:31:07 +00:00
|
|
|
@php
|
|
|
|
|
if (str($status)->contains('(')) {
|
|
|
|
|
$displayStatus = $status;
|
2026-06-05 11:31:20 +00:00
|
|
|
$healthStatus = null;
|
|
|
|
|
} elseif (str($status)->contains(':') && ! str($status)->startsWith('Proxy')) {
|
2025-11-20 16:31:07 +00:00
|
|
|
$parts = explode(':', $status);
|
2026-06-05 11:31:20 +00:00
|
|
|
$displayStatus = str($parts[0])->headline()->value();
|
2025-11-20 16:31:07 +00:00
|
|
|
$healthStatus = $parts[1] ?? null;
|
|
|
|
|
} else {
|
2026-06-05 11:31:20 +00:00
|
|
|
$displayStatus = str($status)->headline()->value();
|
2025-11-20 16:31:07 +00:00
|
|
|
$healthStatus = null;
|
|
|
|
|
}
|
2026-06-05 11:31:20 +00:00
|
|
|
|
|
|
|
|
$badgeStatus = $healthStatus ? "{$displayStatus} ({$healthStatus})" : $displayStatus;
|
2025-11-20 16:31:07 +00:00
|
|
|
@endphp
|
2026-06-05 11:31:20 +00:00
|
|
|
@if ($lastDeploymentLink)
|
|
|
|
|
<x-status-badge as="a" href="{{ $lastDeploymentLink }}" target="_blank" status="{{ $badgeStatus }}" type="warning"
|
|
|
|
|
title="{{ $title }}" class="cursor-pointer underline" />
|
|
|
|
|
@else
|
|
|
|
|
<x-status-badge status="{{ $badgeStatus }}" type="warning" title="{{ $title }}" />
|
|
|
|
|
@endif
|