mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Update UI to reflect new API EE changes
* Show resolved EE for job template details. * Do not show EE if a certain job status still running, since EE on the API is not set yet. It was causing the bug to temporarily show `missing resource`. * Fix discrepancy about job types for list and details. See: https://github.com/ansible/awx/issues/10327 Also: https://github.com/ansible/awx/issues/10399
This commit is contained in:
parent
32cee852f0
commit
2c5bcf268d
@ -21,6 +21,7 @@ function ExecutionEnvironmentDetail({
|
||||
isDefaultEnvironment,
|
||||
virtualEnvironment,
|
||||
verifyMissingVirtualEnv,
|
||||
helpText,
|
||||
}) {
|
||||
const label = isDefaultEnvironment
|
||||
? t`Default Execution Environment`
|
||||
@ -37,6 +38,7 @@ function ExecutionEnvironmentDetail({
|
||||
{executionEnvironment.name}
|
||||
</Link>
|
||||
}
|
||||
helpText={helpText}
|
||||
dataCy="execution-environment-detail"
|
||||
/>
|
||||
);
|
||||
@ -95,6 +97,7 @@ ExecutionEnvironmentDetail.propTypes = {
|
||||
isDefaultEnvironment: bool,
|
||||
virtualEnvironment: string,
|
||||
verifyMissingVirtualEnv: bool,
|
||||
helpText: string,
|
||||
};
|
||||
|
||||
ExecutionEnvironmentDetail.defaultProps = {
|
||||
@ -102,6 +105,7 @@ ExecutionEnvironmentDetail.defaultProps = {
|
||||
executionEnvironment: null,
|
||||
virtualEnvironment: '',
|
||||
verifyMissingVirtualEnv: true,
|
||||
helpText: '',
|
||||
};
|
||||
|
||||
export default ExecutionEnvironmentDetail;
|
||||
|
||||
@ -14,6 +14,7 @@ import ChipGroup from '../ChipGroup';
|
||||
import CredentialChip from '../CredentialChip';
|
||||
import ExecutionEnvironmentDetail from '../ExecutionEnvironmentDetail';
|
||||
import { formatDateString } from '../../util/dates';
|
||||
import { isJobRunning } from '../../util/jobs';
|
||||
import { JOB_TYPE_URL_SEGMENTS } from '../../constants';
|
||||
import JobCancelButton from '../JobCancelButton';
|
||||
|
||||
@ -32,7 +33,7 @@ function JobListItem({
|
||||
const jobTypes = {
|
||||
project_update: t`Source Control Update`,
|
||||
inventory_update: t`Inventory Sync`,
|
||||
job: t`Playbook Run`,
|
||||
job: job.job_type === 'check' ? t`Playbook Check` : t`Playbook Run`,
|
||||
ad_hoc_command: t`Command`,
|
||||
system_job: t`Management Job`,
|
||||
workflow_job: t`Workflow Job`,
|
||||
@ -202,10 +203,12 @@ function JobListItem({
|
||||
dataCy={`job-${job.id}-project`}
|
||||
/>
|
||||
)}
|
||||
<ExecutionEnvironmentDetail
|
||||
executionEnvironment={execution_environment}
|
||||
verifyMissingVirtualEnv={false}
|
||||
/>
|
||||
{job.type !== 'workflow_job' && !isJobRunning(job.status) && (
|
||||
<ExecutionEnvironmentDetail
|
||||
executionEnvironment={execution_environment}
|
||||
verifyMissingVirtualEnv={false}
|
||||
/>
|
||||
)}
|
||||
{credentials && credentials.length > 0 && (
|
||||
<Detail
|
||||
fullWidth
|
||||
|
||||
@ -79,7 +79,7 @@ function JobDetail({ job }) {
|
||||
inventory_update: t`Inventory Sync`,
|
||||
job: job.job_type === 'check' ? t`Playbook Check` : t`Playbook Run`,
|
||||
ad_hoc_command: t`Command`,
|
||||
management_job: t`Management Job`,
|
||||
system_job: t`Management Job`,
|
||||
workflow_job: t`Workflow Job`,
|
||||
};
|
||||
|
||||
@ -220,10 +220,12 @@ function JobDetail({ job }) {
|
||||
<Detail label={t`Playbook`} value={job.playbook} />
|
||||
<Detail label={t`Limit`} value={job.limit} />
|
||||
<Detail label={t`Verbosity`} value={VERBOSITY[job.verbosity]} />
|
||||
<ExecutionEnvironmentDetail
|
||||
executionEnvironment={executionEnvironment}
|
||||
verifyMissingVirtualEnv={false}
|
||||
/>
|
||||
{job.type !== 'workflow_job' && !isJobRunning(job.status) && (
|
||||
<ExecutionEnvironmentDetail
|
||||
executionEnvironment={executionEnvironment}
|
||||
verifyMissingVirtualEnv={false}
|
||||
/>
|
||||
)}
|
||||
<Detail label={t`Execution Node`} value={job.execution_node} />
|
||||
{instanceGroup && !instanceGroup?.is_container_group && (
|
||||
<Detail
|
||||
|
||||
@ -166,7 +166,6 @@ function JobTemplateDetail({ template }) {
|
||||
if (isLoadingInstanceGroups || isDeleteLoading) {
|
||||
return <ContentLoading />;
|
||||
}
|
||||
|
||||
return (
|
||||
<CardBody>
|
||||
<DetailList gutter="sm">
|
||||
@ -212,7 +211,10 @@ function JobTemplateDetail({ template }) {
|
||||
)}
|
||||
<ExecutionEnvironmentDetail
|
||||
virtualEnvironment={custom_virtualenv}
|
||||
executionEnvironment={summary_fields?.execution_environment}
|
||||
executionEnvironment={summary_fields?.resolved_environment}
|
||||
helpText={t`The execution environment that will be used when launching
|
||||
this job template. The resolved execution environment can be overridden by
|
||||
explicitly assigning a different one to this job template.`}
|
||||
/>
|
||||
<Detail label={t`Source Control Branch`} value={template.scm_branch} />
|
||||
<Detail label={t`Playbook`} value={playbook} />
|
||||
|
||||
@ -139,6 +139,12 @@
|
||||
"name": "Default EE",
|
||||
"description": "",
|
||||
"image": "quay.io/ansible/awx-ee"
|
||||
},
|
||||
"resolved_environment": {
|
||||
"id": 1,
|
||||
"name": "Default EE",
|
||||
"description": "",
|
||||
"image": "quay.io/ansible/awx-ee"
|
||||
}
|
||||
},
|
||||
"created": "2019-09-30T16:18:34.564820Z",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user