mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03: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:
parent
609b17aa20
commit
33d7342ffe
@ -97,7 +97,13 @@ function OrganizationDetail({ i18n, organization }) {
|
||||
{summary_fields?.default_environment?.name && (
|
||||
<Detail
|
||||
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
|
||||
|
||||
@ -132,10 +132,15 @@ function ProjectDetail({ project, i18n }) {
|
||||
{summary_fields?.default_environment?.name && (
|
||||
<Detail
|
||||
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>
|
||||
{({ project_base_dir }) => (
|
||||
<Detail
|
||||
|
||||
@ -209,7 +209,13 @@ function JobTemplateDetail({ i18n, template }) {
|
||||
{summary_fields?.execution_environment && (
|
||||
<Detail
|
||||
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
|
||||
|
||||
@ -161,7 +161,7 @@ describe('<JobTemplateDetail />', () => {
|
||||
1
|
||||
);
|
||||
expect(
|
||||
wrapper.find('Detail[label="Execution Environment"]').prop('value')
|
||||
wrapper.find(`Detail[label="Execution Environment"] dd`).text()
|
||||
).toBe('Default EE');
|
||||
});
|
||||
});
|
||||
|
||||
@ -128,7 +128,13 @@ function WorkflowJobTemplateDetail({ template, i18n }) {
|
||||
{summary_fields?.execution_environment && (
|
||||
<Detail
|
||||
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)} />
|
||||
|
||||
@ -134,11 +134,6 @@ describe('<WorkflowJobTemplateDetail/>', () => {
|
||||
prop: 'value',
|
||||
value: 'Workflow Job Template',
|
||||
},
|
||||
{
|
||||
element: 'Detail[label="Execution Environment"]',
|
||||
prop: 'value',
|
||||
value: 'Demo EE',
|
||||
},
|
||||
];
|
||||
|
||||
const organization = wrapper
|
||||
@ -162,6 +157,10 @@ describe('<WorkflowJobTemplateDetail/>', () => {
|
||||
};
|
||||
|
||||
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', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user