Skip to content

Commit

Permalink
updates from PR review
Browse files Browse the repository at this point in the history
Signed-off-by: Blake Jackson <[email protected]>
  • Loading branch information
Blake Jackson authored and Blake Jackson committed Jul 9, 2024
1 parent 41e0139 commit 6246b2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const useStyles = makeStyles({
maxWidth: '420px'
},
chip: {
margin: 4,
margin: '2px 2px 2px 0',
},
});

Expand All @@ -26,6 +26,7 @@ export const ExecutionLabels: React.FC<Props> = ({values}) => {
<div className={classes.chipContainer}>
{Object.entries(values).map(([key, value]) => (
<Chip
color='info'
key={key}
label={value ? `${key}: ${value}` : key}
className={classes.chip}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ export const ExecutionMetadata: React.FC<{}> = () => {
details.push({
label: ExecutionMetadataLabels.labels,
value: (
<ExecutionLabels values={labels.values} />
Object.entries(labels.values).length > 0 ?
<ExecutionLabels values={labels.values} /> : dashedValueString
)
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('ExecutionMetadata', () => {
const { getByTestId } = renderMetadata();
expect(getByTestId(parentNodeExecutionTestId)).toHaveTextContent('name');
})

it('shows labels if spec has them', () => {
const { getByTestId } = renderMetadata();
expect(getByTestId(labelsTestId)).toHaveTextContent("key: value");
Expand Down

0 comments on commit 6246b2a

Please sign in to comment.