2023-07-28 19:36:19 +00:00
@ props ([
2023-09-22 13:29:19 +00:00
'status' => 'Running' ,
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 13:37:03 +00:00
@ php
// Handle both colon format (backend) and parentheses format (from services.blade.php)
// running:healthy → Running (healthy)
// running (healthy) → running (healthy) (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
2024-04-03 11:04:21 +00:00
< div class = " flex items-center " >
2024-12-17 09:38:32 +00:00
< div class = " flex items-center " >
2025-01-22 13:58:55 +00:00
< div wire : loading . delay . longer wire : target = " checkProxy(true) " class = " badge badge-warning " ></ div >
< div wire : loading . remove . delay . longer wire : target = " checkProxy(true) " class = " badge badge-success " ></ div >
2025-10-09 14:38:40 +00:00
< div class = " pl-2 pr-1 text-xs font-bold text-success "
2024-12-17 09:38:32 +00:00
@ if ( $title ) title = " { { $title }} " @ endif >
@ if ( $lastDeploymentLink )
< a href = " { { $lastDeploymentLink }} " target = " _blank " class = " underline cursor-pointer " >
2025-11-20 13:37:03 +00:00
{{ $displayStatus }}
2024-12-17 09:38:32 +00:00
</ a >
@ else
2025-11-20 13:37:03 +00:00
{{ $displayStatus }}
2024-12-17 09:38:32 +00:00
@ endif
</ div >
2025-11-20 13:37:03 +00:00
@ if ( $healthStatus && ! str ( $displayStatus ) -> contains ( '(' ))
< div class = " text-xs text-success " > ({{ $healthStatus }}) </ div >
@ endif
2024-12-17 09:38:32 +00:00
@ php
2025-11-20 13:37:03 +00:00
$showUnknownHelper =
! str ( $status ) -> startsWith ( 'Proxy' ) &&
( str ( $status ) -> contains ( 'unknown' ) || str ( $healthStatus ) -> contains ( 'unknown' ));
2024-12-17 09:38:32 +00:00
$showUnhealthyHelper =
! str ( $status ) -> startsWith ( 'Proxy' ) &&
2025-11-20 13:37:03 +00:00
( str ( $status ) -> contains ( 'unhealthy' ) || str ( $healthStatus ) -> contains ( 'unhealthy' ));
2024-12-17 09:38:32 +00:00
@ endphp
2025-11-20 13:37:03 +00:00
@ if ( $showUnknownHelper )
2025-11-21 07:36:50 +00:00
< div class = " px-2 " >
2025-11-20 13:37:03 +00:00
< x - helper
helper = " No health check configured. <span class='dark:text-warning text-coollabs'>The resource may be functioning normally.</span><br><br>Traefik and Caddy will route traffic to this container even without a health check. However, configuring a health check is recommended to ensure the resource is ready before receiving traffic.<br><br>More details in the <a href='https://coolify.io/docs/knowledge-base/proxy/traefik/healthchecks' class='underline dark:text-warning text-coollabs' target='_blank'>documentation</a>. " >
< x - slot : icon >
< svg class = " hidden w-4 h-4 dark:text-warning lg:block " viewBox = " 0 0 256 256 "
xmlns = " http://www.w3.org/2000/svg " >
< path fill = " currentColor "
d = " M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16 " >
</ path >
</ svg >
</ x - slot : icon >
</ x - helper >
2025-11-21 07:36:50 +00:00
</ div >
2025-11-20 13:37:03 +00:00
@ endif
2024-12-17 09:38:32 +00:00
@ if ( $showUnhealthyHelper )
2025-11-21 07:36:50 +00:00
< div class = " px-2 " >
2024-12-17 09:38:32 +00:00
< x - helper
2025-11-20 13:37:03 +00:00
helper = " Unhealthy state. <span class='dark:text-warning text-coollabs'>The health check is failing.</span><br><br>This resource will <span class='dark:text-warning text-coollabs'>NOT work with Traefik</span> as it expects a healthy state. Your action is required to fix the health check or the underlying issue causing it to fail.<br><br>More details in the <a href='https://coolify.io/docs/knowledge-base/proxy/traefik/healthchecks' class='underline dark:text-warning text-coollabs' target='_blank'>documentation</a>. " >
2024-04-12 11:15:24 +00:00
< x - slot : icon >
2024-12-17 09:38:32 +00:00
< svg class = " hidden w-4 h-4 dark:text-warning lg:block " viewBox = " 0 0 256 256 "
xmlns = " http://www.w3.org/2000/svg " >
< path fill = " currentColor "
d = " M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16 " >
</ path >
2024-04-12 11:15:24 +00:00
</ svg >
</ x - slot : icon >
</ x - helper >
2025-11-21 07:36:50 +00:00
</ div >
2024-04-12 11:15:24 +00:00
@ endif
2024-12-17 09:38:32 +00:00
</ div >
2023-06-08 08:55:50 +00:00
</ div >