mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 02:17:37 -02:30
Merge pull request #2895 from AlanCoding/scm_vars
Allow SCM overwrite vars in the UI Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -185,10 +185,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition',
|
|||||||
|
|
||||||
if (source === 'scm') {
|
if (source === 'scm') {
|
||||||
$scope.projectBasePath = GetBasePath('projects') + '?not__status=never updated';
|
$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
|
// reset fields
|
||||||
@@ -201,6 +197,7 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition',
|
|||||||
$scope.credential_name = null;
|
$scope.credential_name = null;
|
||||||
$scope.group_by = null;
|
$scope.group_by = null;
|
||||||
$scope.group_by_choices = [];
|
$scope.group_by_choices = [];
|
||||||
|
$scope.overwrite_vars = false;
|
||||||
initRegionSelect();
|
initRegionSelect();
|
||||||
};
|
};
|
||||||
// region / source options callback
|
// 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
|
// reset fields
|
||||||
$scope.group_by_choices = source === 'ec2' ? $scope.ec2_group_by : null;
|
$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
|
// 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.credential_name = null;
|
||||||
$scope.group_by = null;
|
$scope.group_by = null;
|
||||||
$scope.group_by_choices = [];
|
$scope.group_by_choices = [];
|
||||||
|
$scope.overwrite_vars = false;
|
||||||
|
|
||||||
initRegionSelect();
|
initRegionSelect();
|
||||||
|
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ return {
|
|||||||
dataTitle: i18n._('Overwrite Variables'),
|
dataTitle: i18n._('Overwrite Variables'),
|
||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
dataPlacement: 'right',
|
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',
|
name: 'update_on_launch',
|
||||||
label: i18n._('Update on Launch'),
|
label: i18n._('Update on Launch'),
|
||||||
|
|||||||
Reference in New Issue
Block a user