mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Merge pull request #6625 from marshmalien/jt-form-bugs
Fix JT form playbook select error message and more Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -108,10 +108,7 @@ class JobTemplateEdit extends Component {
|
|||||||
try {
|
try {
|
||||||
await JobTemplatesAPI.update(template.id, remainingValues);
|
await JobTemplatesAPI.update(template.id, remainingValues);
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.submitLabels(
|
this.submitLabels(labels, template?.organization),
|
||||||
labels,
|
|
||||||
values.project.summary_fields.organization.id
|
|
||||||
),
|
|
||||||
this.submitInstanceGroups(instanceGroups, initialInstanceGroups),
|
this.submitInstanceGroups(instanceGroups, initialInstanceGroups),
|
||||||
this.submitCredentials(credentials),
|
this.submitCredentials(credentials),
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ function JobTemplateForm({
|
|||||||
i18n,
|
i18n,
|
||||||
}) {
|
}) {
|
||||||
const [contentError, setContentError] = useState(false);
|
const [contentError, setContentError] = useState(false);
|
||||||
const [project, setProject] = useState(null);
|
const [project, setProject] = useState(template?.summary_fields?.project);
|
||||||
const [inventory, setInventory] = useState(
|
const [inventory, setInventory] = useState(
|
||||||
template?.summary_fields?.inventory
|
template?.summary_fields?.inventory
|
||||||
);
|
);
|
||||||
@@ -282,6 +282,7 @@ function JobTemplateForm({
|
|||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="template-playbook"
|
fieldId="template-playbook"
|
||||||
helperTextInvalid={playbookMeta.error}
|
helperTextInvalid={playbookMeta.error}
|
||||||
|
isValid={!playbookMeta.touched || !playbookMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
label={i18n._(t`Playbook`)}
|
label={i18n._(t`Playbook`)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const JobTemplate = shape({
|
|||||||
inventory: number,
|
inventory: number,
|
||||||
job_type: oneOf(['run', 'check']),
|
job_type: oneOf(['run', 'check']),
|
||||||
playbook: string,
|
playbook: string,
|
||||||
project: shape({}),
|
project: number,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const Inventory = shape({
|
export const Inventory = shape({
|
||||||
|
|||||||
Reference in New Issue
Block a user