diff --git a/awx/ui_next/src/components/CodeMirrorInput/index.js b/awx/ui_next/src/components/CodeMirrorInput/index.js index 932883224b..48940bbb37 100644 --- a/awx/ui_next/src/components/CodeMirrorInput/index.js +++ b/awx/ui_next/src/components/CodeMirrorInput/index.js @@ -1,4 +1,5 @@ import CodeMirrorInput from './CodeMirrorInput'; export default CodeMirrorInput; +export { default as VariablesInput } from './VariablesInput'; export { default as VariablesField } from './VariablesField'; diff --git a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx index 93f5a825e6..57e03638ed 100644 --- a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx +++ b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx @@ -1,4 +1,4 @@ -import React, { Component, useState, useEffect } from 'react'; +import React from 'react'; import { Link, withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; @@ -6,8 +6,7 @@ import { CardBody, Button } from '@patternfly/react-core'; import styled from 'styled-components'; import { DetailList, Detail } from '@components/DetailList'; import { ChipGroup, Chip } from '@components/Chip'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; +import { VariablesInput } from '@components/CodeMirrorInput'; import { toTitleCase } from '@util/strings'; const ActionButtonWrapper = styled.div` @@ -24,13 +23,13 @@ const VERBOSITY = { }; function JobDetail ({ job, i18n }) { - const [instanceGroups, setInstanceGroups] = useState(null); - console.log(job); const { job_template: jobTemplate, project, inventory, instance_group: instanceGroup, + credentials, + labels, } = job.summary_fields; return ( @@ -114,20 +113,49 @@ function JobDetail ({ job, i18n }) { label={i18n._(t`Job Slice`)} value={`${job.job_slice_number}/${job.job_slice_count}`} /> - {(instanceGroups && instanceGroups.length > 0) && ( + {(credentials && credentials.length > 0) && ( - {instanceGroups.map(ig => ( - {ig.name} + {credentials.map(c => ( + {c.name} + ))} + + )} + /> + )} + {(labels && labels.count > 0) && ( + + {labels.results.map(l => ( + {l.name} ))} )} /> )} + +