mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
Linkify reference to EE on details page
Linkify reference to EE on a few details page. See: https://github.com/ansible/awx/issues/9189
This commit is contained in:
@@ -97,7 +97,13 @@ function OrganizationDetail({ i18n, organization }) {
|
|||||||
{summary_fields?.default_environment?.name && (
|
{summary_fields?.default_environment?.name && (
|
||||||
<Detail
|
<Detail
|
||||||
label={i18n._(t`Default Execution Environment`)}
|
label={i18n._(t`Default Execution Environment`)}
|
||||||
value={summary_fields.default_environment.name}
|
value={
|
||||||
|
<Link
|
||||||
|
to={`/execution_environments/${summary_fields.default_environment.id}/details`}
|
||||||
|
>
|
||||||
|
{summary_fields.default_environment.name}
|
||||||
|
</Link>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<UserDateDetail
|
<UserDateDetail
|
||||||
|
|||||||
@@ -132,10 +132,15 @@ function ProjectDetail({ project, i18n }) {
|
|||||||
{summary_fields?.default_environment?.name && (
|
{summary_fields?.default_environment?.name && (
|
||||||
<Detail
|
<Detail
|
||||||
label={i18n._(t`Execution Environment`)}
|
label={i18n._(t`Execution Environment`)}
|
||||||
value={summary_fields.default_environment.name}
|
value={
|
||||||
|
<Link
|
||||||
|
to={`/execution_environments/${summary_fields.default_environment.id}/details`}
|
||||||
|
>
|
||||||
|
{summary_fields.default_environment.name}
|
||||||
|
</Link>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Config>
|
<Config>
|
||||||
{({ project_base_dir }) => (
|
{({ project_base_dir }) => (
|
||||||
<Detail
|
<Detail
|
||||||
|
|||||||
@@ -209,7 +209,13 @@ function JobTemplateDetail({ i18n, template }) {
|
|||||||
{summary_fields?.execution_environment && (
|
{summary_fields?.execution_environment && (
|
||||||
<Detail
|
<Detail
|
||||||
label={i18n._(t`Execution Environment`)}
|
label={i18n._(t`Execution Environment`)}
|
||||||
value={summary_fields.execution_environment.name}
|
value={
|
||||||
|
<Link
|
||||||
|
to={`/execution_environments/${summary_fields.execution_environment.id}/details`}
|
||||||
|
>
|
||||||
|
{summary_fields.execution_environment.name}
|
||||||
|
</Link>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Detail
|
<Detail
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ describe('<JobTemplateDetail />', () => {
|
|||||||
1
|
1
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
wrapper.find('Detail[label="Execution Environment"]').prop('value')
|
wrapper.find(`Detail[label="Execution Environment"] dd`).text()
|
||||||
).toBe('Default EE');
|
).toBe('Default EE');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -128,7 +128,13 @@ function WorkflowJobTemplateDetail({ template, i18n }) {
|
|||||||
{summary_fields?.execution_environment && (
|
{summary_fields?.execution_environment && (
|
||||||
<Detail
|
<Detail
|
||||||
label={i18n._(t`Execution Environment`)}
|
label={i18n._(t`Execution Environment`)}
|
||||||
value={summary_fields.execution_environment.name}
|
value={
|
||||||
|
<Link
|
||||||
|
to={`/execution_environments/${summary_fields.execution_environment.id}/details`}
|
||||||
|
>
|
||||||
|
{summary_fields.execution_environment.name}
|
||||||
|
</Link>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Detail label={i18n._(t`Job Type`)} value={toTitleCase(type)} />
|
<Detail label={i18n._(t`Job Type`)} value={toTitleCase(type)} />
|
||||||
|
|||||||
@@ -134,11 +134,6 @@ describe('<WorkflowJobTemplateDetail/>', () => {
|
|||||||
prop: 'value',
|
prop: 'value',
|
||||||
value: 'Workflow Job Template',
|
value: 'Workflow Job Template',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
element: 'Detail[label="Execution Environment"]',
|
|
||||||
prop: 'value',
|
|
||||||
value: 'Demo EE',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const organization = wrapper
|
const organization = wrapper
|
||||||
@@ -162,6 +157,10 @@ describe('<WorkflowJobTemplateDetail/>', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
renderedValues.map(value => assertValue(value));
|
renderedValues.map(value => assertValue(value));
|
||||||
|
|
||||||
|
expect(
|
||||||
|
wrapper.find(`Detail[label="Execution Environment"] dd`).text()
|
||||||
|
).toBe('Demo EE');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('link out resource have the correct url', () => {
|
test('link out resource have the correct url', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user