pilotwings/frontend/utils.ts
Michel Roux d45299a983
All checks were successful
pilotwings / python (push) Successful in 1m47s
pilotwings / node (push) Successful in 1m11s
pilotwings / docker (push) Successful in 2m53s
feat: start / stop container fix #3
2024-11-05 23:45:23 +01:00

17 lines
458 B
TypeScript

export const get_status_icon = (
status: string,
): { name: string; type: string } => {
switch (status) {
case 'running':
return { name: 'play', type: 'success' }
case 'restarting':
return { name: 'refresh', type: 'danger' }
case 'paused':
return { name: 'pause', type: 'warning' }
case 'exited':
return { name: 'stop', type: 'danger' }
default:
return { name: 'question-circle', type: 'warning' }
}
}