17 lines
458 B
TypeScript
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' }
|
|
}
|
|
}
|