Skip to content

Commit

Permalink
Adding job facets. (#2979)
Browse files Browse the repository at this point in the history
Signed-off-by: phixMe <peter.hicks@pdtechsolutions.com>
  • Loading branch information
phixMe authored Nov 12, 2024
1 parent 157d586 commit 41d9d3d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions web/src/components/jobs/RunInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ type RunInfoProps = {

const RunInfo: FunctionComponent<RunInfoProps> = (props) => {
const { run, jobFacets, fetchJobFacets, resetFacets } = props
const i18next = require('i18next')

useEffect(() => {
fetchJobFacets(run.id)
Expand All @@ -65,16 +64,20 @@ const RunInfo: FunctionComponent<RunInfoProps> = (props) => {
language={(jobFacets.sourceCode as SourceCodeFacet)?.language}
/>
)}
{jobFacets && (
<Box mt={2}>
<Box mb={1}>
<MqText subheading>JOB FACETS</MqText>
</Box>
<MqJsonView data={jobFacets} aria-label={'Job facets'} aria-required='true' />
</Box>
)}
{run.facets && (
<Box mt={2}>
<Box mb={1}>
<MqText subheading>{i18next.t('jobs.runinfo_subhead')}</MqText>
<MqText subheading>RUN FACETS</MqText>
</Box>
<MqJsonView
data={run.facets}
aria-label={i18next.t('jobs.facets_subhead_aria')}
aria-required='true'
/>
<MqJsonView data={run.facets} aria-label={'Run facets'} aria-required='true' />
</Box>
)}
</Box>
Expand Down

0 comments on commit 41d9d3d

Please sign in to comment.