1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Allow SCM overwrite vars in the UI

This commit is contained in:
AlanCoding 2018-12-10 07:10:18 -05:00 committed by Jake McDermott
parent d021c253aa
commit 5dd8c3ace2
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7
3 changed files with 3 additions and 12 deletions

View File

@ -185,10 +185,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition',
if (source === 'scm') {
$scope.projectBasePath = GetBasePath('projects') + '?not__status=never updated';
$scope.overwrite_vars = true;
$scope.inventory_source_form.inventory_file.$setPristine();
} else {
$scope.overwrite_vars = false;
}
// reset fields
@ -201,6 +197,7 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition',
$scope.credential_name = null;
$scope.group_by = null;
$scope.group_by_choices = [];
$scope.overwrite_vars = false;
initRegionSelect();
};
// region / source options callback

View File

@ -392,13 +392,6 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString',
});
}
if (source === 'scm') {
$scope.overwrite_vars = true;
$scope.inventory_source_form.inventory_file.$setPristine();
} else {
$scope.overwrite_vars = false;
}
// reset fields
$scope.group_by_choices = source === 'ec2' ? $scope.ec2_group_by : null;
// azure_rm regions choices are keyed as "azure" in an OPTIONS request to the inventory_sources endpoint
@ -409,6 +402,7 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString',
$scope.credential_name = null;
$scope.group_by = null;
$scope.group_by_choices = [];
$scope.overwrite_vars = false;
initRegionSelect();

View File

@ -367,7 +367,7 @@ return {
dataTitle: i18n._('Overwrite Variables'),
dataContainer: 'body',
dataPlacement: 'right',
ngDisabled: "(!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd) || source.value === 'scm')"
ngDisabled: "(!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd))"
}, {
name: 'update_on_launch',
label: i18n._('Update on Launch'),