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:
parent
d021c253aa
commit
5dd8c3ace2
@ -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
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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'),
|
||||
|
Loading…
Reference in New Issue
Block a user