mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
Add collection setting toggle to UI
Additional API housekeeping, removing unused code Treat default branch as no branch provided
This commit is contained in:
@@ -399,6 +399,10 @@ class JobTemplate(UnifiedJobTemplate, JobOptions, SurveyJobTemplateMixin, Resour
|
|||||||
# no-op case: Fields the same as template's value
|
# no-op case: Fields the same as template's value
|
||||||
# counted as neither accepted or ignored
|
# counted as neither accepted or ignored
|
||||||
continue
|
continue
|
||||||
|
elif field_name == 'scm_branch' and old_value == '' and self.project and new_value == self.project.scm_branch:
|
||||||
|
# special case of "not provided" for branches
|
||||||
|
# job template does not provide branch, runs with default branch
|
||||||
|
continue
|
||||||
elif getattr(self, ask_field_name):
|
elif getattr(self, ask_field_name):
|
||||||
# Special case where prompts can be rejected based on project setting
|
# Special case where prompts can be rejected based on project setting
|
||||||
if field_name == 'scm_branch':
|
if field_name == 'scm_branch':
|
||||||
|
|||||||
@@ -702,8 +702,7 @@ class BaseTask(object):
|
|||||||
abstract = True
|
abstract = True
|
||||||
proot_show_paths = []
|
proot_show_paths = []
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self):
|
||||||
super(BaseTask, self).__init__(*args, **kwargs)
|
|
||||||
self.cleanup_paths = []
|
self.cleanup_paths = []
|
||||||
|
|
||||||
def update_model(self, pk, _attempt=0, **updates):
|
def update_model(self, pk, _attempt=0, **updates):
|
||||||
|
|||||||
@@ -137,7 +137,6 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
# TODO: don't run this if ansible verison doens't support collections
|
|
||||||
- name: detect collections/requirements.yml
|
- name: detect collections/requirements.yml
|
||||||
stat: path={{project_path|quote}}/collections/requirements.yml
|
stat: path={{project_path|quote}}/collections/requirements.yml
|
||||||
register: doesCollectionRequirementsExist
|
register: doesCollectionRequirementsExist
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ export default ['i18n', function(i18n) {
|
|||||||
AWX_ROLES_ENABLED: {
|
AWX_ROLES_ENABLED: {
|
||||||
type: 'toggleSwitch',
|
type: 'toggleSwitch',
|
||||||
},
|
},
|
||||||
|
AWX_COLLECTIONS_ENABLED: {
|
||||||
|
type: 'toggleSwitch',
|
||||||
|
},
|
||||||
AWX_TASK_ENV: {
|
AWX_TASK_ENV: {
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
reset: 'AWX_TASK_ENV',
|
reset: 'AWX_TASK_ENV',
|
||||||
|
|||||||
Reference in New Issue
Block a user