Add managed by tower as part of the EE details page

Add managed by tower as part of the EE details page.

See: https://github.com/ansible/awx/issues/8171
This commit is contained in:
nixocio
2021-03-24 15:00:35 -04:00
parent 03ab9f4e2a
commit ac41af8a54
2 changed files with 12 additions and 0 deletions

View File

@@ -64,6 +64,11 @@ function ExecutionEnvironmentDetails({ executionEnvironment, i18n }) {
value={description} value={description}
dataCy="execution-environment-detail-description" dataCy="execution-environment-detail-description"
/> />
<Detail
label={i18n._(t`Managed by Tower`)}
value={managedByTower ? i18n._(t`True`) : i18n._(t`False`)}
dataCy="execution-environment-managed-by-tower"
/>
<Detail <Detail
label={i18n._(t`Organization`)} label={i18n._(t`Organization`)}
value={ value={
@@ -79,6 +84,7 @@ function ExecutionEnvironmentDetails({ executionEnvironment, i18n }) {
} }
dataCy="execution-environment-detail-organization" dataCy="execution-environment-detail-organization"
/> />
<Detail <Detail
label={i18n._(t`Pull`)} label={i18n._(t`Pull`)}
value={pull === '' ? i18n._(t`Missing`) : toTitleCase(pull)} value={pull === '' ? i18n._(t`Missing`) : toTitleCase(pull)}

View File

@@ -73,6 +73,9 @@ describe('<ExecutionEnvironmentDetails/>', () => {
expect( expect(
wrapper.find('Detail[label="Credential"]').prop('value').props.children wrapper.find('Detail[label="Credential"]').prop('value').props.children
).toEqual(executionEnvironment.summary_fields.credential.name); ).toEqual(executionEnvironment.summary_fields.credential.name);
expect(
wrapper.find('Detail[label="Managed by Tower"]').prop('value')
).toEqual('False');
const dates = wrapper.find('UserDateDetail'); const dates = wrapper.find('UserDateDetail');
expect(dates).toHaveLength(2); expect(dates).toHaveLength(2);
expect(dates.at(0).prop('date')).toEqual(executionEnvironment.created); expect(dates.at(0).prop('date')).toEqual(executionEnvironment.created);
@@ -167,6 +170,9 @@ describe('<ExecutionEnvironmentDetails/>', () => {
expect( expect(
wrapper.find('Detail[label="Credential"]').prop('value').props.children wrapper.find('Detail[label="Credential"]').prop('value').props.children
).toEqual(executionEnvironment.summary_fields.credential.name); ).toEqual(executionEnvironment.summary_fields.credential.name);
expect(
wrapper.find('Detail[label="Managed by Tower"]').prop('value')
).toEqual('True');
const dates = wrapper.find('UserDateDetail'); const dates = wrapper.find('UserDateDetail');
expect(dates).toHaveLength(2); expect(dates).toHaveLength(2);
expect(dates.at(0).prop('date')).toEqual(executionEnvironment.created); expect(dates.at(0).prop('date')).toEqual(executionEnvironment.created);