mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-29 10:20:47 +00:00
15 lines
388 B
TypeScript
15 lines
388 B
TypeScript
export function getStatusOfService(service: any) {
|
|
if (service) {
|
|
if (service.status.isRunning === 'running') {
|
|
return 'running';
|
|
}
|
|
if (service.status.isExited === 'exited') {
|
|
return 'stopped';
|
|
}
|
|
if (service.status.isRestarting === 'degraded') {
|
|
return 'degraded';
|
|
}
|
|
}
|
|
|
|
return 'stopped';
|
|
} |