From 6fd86fed65f8d29399c3479977e3e7d11667b564 Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Wed, 21 Aug 2019 16:10:29 -0700 Subject: [PATCH] add jt advanced fields --- .../Template/shared/InventoriesLookup.jsx | 1 + .../Template/shared/JobTemplateForm.jsx | 121 +++++++++++++++++- 2 files changed, 118 insertions(+), 4 deletions(-) diff --git a/awx/ui_next/src/screens/Template/shared/InventoriesLookup.jsx b/awx/ui_next/src/screens/Template/shared/InventoriesLookup.jsx index 3bef9f782a..f4ef84771d 100644 --- a/awx/ui_next/src/screens/Template/shared/InventoriesLookup.jsx +++ b/awx/ui_next/src/screens/Template/shared/InventoriesLookup.jsx @@ -27,6 +27,7 @@ class InventoriesLookup extends React.Component { )} } + isRequired={required} fieldId="inventories-lookup" > @@ -271,7 +279,6 @@ class JobTemplateForm extends Component { ); } - return (
@@ -417,7 +424,101 @@ class JobTemplateForm extends Component { - Advanced inputs here + + + {i18n._(t`The number of parallel or simultaneous + processes to use while executing the playbook. An empty value, + or a value less than 1 will use the Ansible default which is + usually 5. The default number of forks can be overwritten + with a change to`)}{' '} + ansible.cfg.{' '} + {i18n._(t`Refer to the Ansible documentation for details + about the configuration file.`)} + + } + /> + + ( + + + + + + + )} + /> + + + ( + + + + +
+ + form.setFieldValue(field.name, checked) + } + /> +
+
+ )} + /> +
@@ -433,8 +534,14 @@ const FormikApp = withFormik({ description = '', job_type = 'run', inventory = '', - playbook = '', project = '', + playbook = '', + forks, + limit, + verbosity, + job_slicing, + timeout, + diff_mode summary_fields = { labels: { results: [] } }, } = { ...template }; @@ -446,6 +553,12 @@ const FormikApp = withFormik({ project: project || '', playbook: playbook || '', labels: summary_fields.labels.results, + forks: forks || '', + limit: limit || '', + verbosity: verbosity || '0', + job_slice_count: job_slicing || '', + timout: timeout || '', + diff_mode: diff_mode || false, }; }, handleSubmit: (values, bag) => bag.props.handleSubmit(values),