-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENG-2309 UI bug fixes for better rendering metrics and checks that ha…
…ve no value (#934) * UI bug fixes to better handle rendering checks and metrics that have no values due to failed workflow execution.
- Loading branch information
Andre Giron
authored
Jan 31, 2023
1 parent
728e11a
commit e1b0e58
Showing
9 changed files
with
210 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Typography } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
import { stringToExecutionStatus } from '../../utils/shared'; | ||
import { StatusIndicator } from '../workflows/workflowStatus'; | ||
|
||
interface MetricTableItemProps { | ||
metricValue?: string; | ||
// ExecutionStatus serialized as a string. | ||
status?: string; | ||
} | ||
|
||
export const MetricTableItem: React.FC<MetricTableItemProps> = ({ | ||
metricValue, | ||
status, | ||
}) => { | ||
if (!metricValue) { | ||
return ( | ||
<StatusIndicator | ||
status={stringToExecutionStatus(status)} | ||
size={'16px'} | ||
monochrome={false} | ||
/> | ||
); | ||
} | ||
|
||
return ( | ||
<Typography | ||
sx={{ | ||
fontWeight: 300, | ||
}} | ||
> | ||
{metricValue.toString()} | ||
</Typography> | ||
); | ||
}; | ||
|
||
export default MetricTableItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.