Skip to content

Commit

Permalink
Status chip added to worker details
Browse files Browse the repository at this point in the history
  • Loading branch information
onattech committed Mar 9, 2022
1 parent 18be09c commit 6beb796
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions frontend/src/pages/Workers/WorkerDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,15 @@ const CustomWorker = ({ row }) => {
<Typography component="h4" variant="h3" sx={{ display: 'inline' }}>
{WorkerID}
</Typography>
<Typography
component="h4"
variant="subtitle1"
color={Status === 'Online' ? 'green' : 'red'}
fontWeight={700}
ml={3}
sx={{ display: 'inline', verticalAlign: 'top' }}>
{Status}
</Typography>
</div>
<Typography component="h5" mt={0.5} variant="subtitle1">
<Typography component="h5" mt={0.5} variant="subtitle1" mb={1}>
Last updated: {T}
</Typography>
{Status === 'Online' ? (
<CustomChip label={'Online'} customColor="green" style={{ width: 'fit-content' }} />
) : (
<CustomChip label="Offline" customColor="red" style={{ width: 'fit-content' }} />
)}
{/* <Grid item display="flex" alignItems="center" mt={2} sx={{ alignSelf: 'flex-start' }}>
<CustomChip amount={queue} label="Queue" margin={2} customColor="purple" />
<CustomChip amount={running} label="Running" margin={1} customColor="orange" />
Expand Down

0 comments on commit 6beb796

Please sign in to comment.