blob: 8daf48c7d983ac9419e867760f9bac28fd0d0c2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
import {
faBan,
faCircle,
faCircleCheck,
faCircleExclamation,
faRotate,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import type { ExecResultStatus } from "../../models/ExecResult";
type Props = {
status: ExecResultStatus;
};
export default function ExecStatusIndicatorIcon({ status }: Props) {
switch (status) {
case "waiting_submission":
return (
<FontAwesomeIcon icon={faCircle} fixedWidth className="text-gray-400" />
);
case "running":
return (
<FontAwesomeIcon
icon={faRotate}
spin
fixedWidth
className="text-gray-700"
/>
);
case "success":
return (
<FontAwesomeIcon
icon={faCircleCheck}
fixedWidth
className="text-green-500"
/>
);
case "canceled":
return (
<FontAwesomeIcon icon={faBan} fixedWidth className="text-gray-400" />
);
default:
return (
<FontAwesomeIcon
icon={faCircleExclamation}
fixedWidth
className="text-red-500"
/>
);
}
}
|