mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 15:06:02 -03:30
Add execution environment detail to template expanded row
This commit is contained in:
@@ -17,6 +17,7 @@ import { ActionsTd, ActionItem } from '../PaginatedTable';
|
||||
import { DetailList, Detail, DeletedDetail } from '../DetailList';
|
||||
import ChipGroup from '../ChipGroup';
|
||||
import CredentialChip from '../CredentialChip';
|
||||
import ExecutionEnvironmentDetail from '../ExecutionEnvironmentDetail';
|
||||
import { timeOfDay, formatDateString } from '../../util/dates';
|
||||
|
||||
import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '../../api';
|
||||
@@ -258,7 +259,8 @@ function TemplateListItem({
|
||||
dataCy={`template-${template.id}-inventory`}
|
||||
/>
|
||||
) : (
|
||||
!askInventoryOnLaunch && (
|
||||
!askInventoryOnLaunch &&
|
||||
template.type === 'job_template' && (
|
||||
<DeletedDetail label={i18n._(t`Inventory`)} />
|
||||
)
|
||||
)}
|
||||
@@ -273,6 +275,10 @@ function TemplateListItem({
|
||||
dataCy={`template-${template.id}-project`}
|
||||
/>
|
||||
)}
|
||||
<ExecutionEnvironmentDetail
|
||||
virtualEnvironment={template.custom_virtualenv}
|
||||
executionEnvironment={summaryFields?.execution_environment}
|
||||
/>
|
||||
<Detail
|
||||
label={i18n._(t`Last Modified`)}
|
||||
value={formatDateString(template.modified)}
|
||||
|
||||
@@ -419,6 +419,7 @@ describe('<TemplateListItem />', () => {
|
||||
assertDetail('Organization', "Mike's Org");
|
||||
assertDetail('Inventory', "Mike's Inventory");
|
||||
assertDetail('Project', "Mike's Project");
|
||||
assertDetail('Execution Environment', 'Mock EE 1.2.3');
|
||||
expect(
|
||||
wrapper.find('Detail[label="Credentials"]').containsAllMatchingElements([
|
||||
<span>
|
||||
|
||||
@@ -138,6 +138,12 @@
|
||||
"id": "1",
|
||||
"name": "Webhook Credential"
|
||||
|
||||
},
|
||||
"execution_environment": {
|
||||
"description": "",
|
||||
"id": 1,
|
||||
"image": "foo.io/mock/test-ee:1.2.3",
|
||||
"name": "Mock EE 1.2.3"
|
||||
}
|
||||
},
|
||||
"created": "2019-09-30T16:18:34.564820Z",
|
||||
@@ -179,6 +185,7 @@
|
||||
"diff_mode": false,
|
||||
"allow_simultaneous": false,
|
||||
"custom_virtualenv": null,
|
||||
"execution_environment": 1,
|
||||
"job_slice_count": 1,
|
||||
"webhook_credential": 1,
|
||||
"webhook_key": "asertdyuhjkhgfd234567kjgfds",
|
||||
|
||||
Reference in New Issue
Block a user