Skip to content

Commit

Permalink
Additional icons for new statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
sude-dewi committed Aug 19, 2024
1 parent 64af36f commit 8edbe8c
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions packages/react-components/src/Jobs/JobList/helpers/StatusCell.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import {
Box,
CircularProgress,
Tooltip,
Typography,
} from '@material-ui/core';
import { Box, CircularProgress, Tooltip, Typography } from '@material-ui/core';
import { blue, green, red, yellow } from '@material-ui/core/colors';
import {
AccessTimeOutlined,
Cancel,
CancelScheduleSend,
CheckCircle,
Error,
HelpOutline,
HourglassEmpty,
PlayCircleFilled,
TimerOffOutlined,
} from '@material-ui/icons';
import React, { useMemo } from 'react';
Expand All @@ -31,7 +28,12 @@ const StatusCell = ({ row }: { row: any }) => {
return (
<Tooltip title={status}>
<Box position="relative" display="inline-flex">
<CircularProgress style={{ color: blue[900] }} variant={'indeterminate'} size={28} thickness={4} />
<CircularProgress
style={{ color: blue[900] }}
variant={'indeterminate'}
size={28}
thickness={4}
/>
<Box
top={0}
left={0}
Expand All @@ -42,7 +44,13 @@ const StatusCell = ({ row }: { row: any }) => {
alignItems="center"
justifyContent="center"
>
<Typography variant="caption" component="div" style={{ fontSize: 10 }}>{progress ? `${progress}%` : ''}</Typography>
<Typography
variant="caption"
component="div"
style={{ fontSize: 10 }}
>
{progress ? `${progress}%` : ''}
</Typography>
</Box>
</Box>
</Tooltip>
Expand Down Expand Up @@ -78,6 +86,24 @@ const StatusCell = ({ row }: { row: any }) => {
<TimerOffOutlined style={{ color: yellow[900] }} />
</Tooltip>
);
case 'Starting':
return (
<Tooltip title={status}>
<PlayCircleFilled style={{ color: green[900] }} />
</Tooltip>
);
case 'TimedOut':
return (
<Tooltip title={status}>
<AccessTimeOutlined style={{ color: red[900] }} />
</Tooltip>
);
case 'Rejected':
return (
<Tooltip title={status}>
<Cancel style={{ color: red[900] }} />
</Tooltip>
);
default:
return (
<Tooltip title={status}>
Expand Down

0 comments on commit 8edbe8c

Please sign in to comment.