mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Retrieved cloud credential from job template summary fields
This commit is contained in:
parent
5c32b17aea
commit
33bb3abd52
@ -347,20 +347,13 @@ export default
|
||||
|
||||
ParseTypeChange({ scope: $scope, field_id: 'job_templates_variables', onChange: callback });
|
||||
|
||||
if (related_cloud_credential) {
|
||||
Rest.setUrl(related_cloud_credential);
|
||||
Rest.get()
|
||||
.success(function (data) {
|
||||
$scope.$emit('cloudCredentialReady', data.name);
|
||||
})
|
||||
.error(function (data, status) {
|
||||
ProcessErrors($scope, data, status, null, {hdr: 'Error!',
|
||||
msg: 'Failed to related cloud credential. GET returned status: ' + status });
|
||||
});
|
||||
if(related_cloud_credential) {
|
||||
$scope.$emit('cloudCredentialReady', $scope.job_template_obj.summary_fields.cloud_credential.name);
|
||||
} else {
|
||||
// No existing cloud credential
|
||||
$scope.$emit('cloudCredentialReady', null);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Wait('start');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user