g3 console initial cut + error doesnt kill auto
This commit is contained in:
28
crates/g3-console/web/src/components/StatusBadge.jsx
Normal file
28
crates/g3-console/web/src/components/StatusBadge.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react'
|
||||
|
||||
function StatusBadge({ status }) {
|
||||
const getStatusClass = () => {
|
||||
switch (status) {
|
||||
case 'running':
|
||||
return 'hero-badge hero-badge-success'
|
||||
case 'completed':
|
||||
return 'hero-badge hero-badge-success'
|
||||
case 'failed':
|
||||
return 'hero-badge hero-badge-error'
|
||||
case 'idle':
|
||||
return 'hero-badge hero-badge-warning'
|
||||
case 'terminated':
|
||||
return 'hero-badge hero-badge-error'
|
||||
default:
|
||||
return 'hero-badge hero-badge-info'
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<span className={getStatusClass()}>
|
||||
{status.toUpperCase()}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
export default StatusBadge
|
||||
Reference in New Issue
Block a user