mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 08:48:46 -03:30
Retrieved cloud credential from job template summary fields
This commit is contained in:
@@ -347,20 +347,13 @@ export default
|
|||||||
|
|
||||||
ParseTypeChange({ scope: $scope, field_id: 'job_templates_variables', onChange: callback });
|
ParseTypeChange({ scope: $scope, field_id: 'job_templates_variables', onChange: callback });
|
||||||
|
|
||||||
if (related_cloud_credential) {
|
if(related_cloud_credential) {
|
||||||
Rest.setUrl(related_cloud_credential);
|
$scope.$emit('cloudCredentialReady', $scope.job_template_obj.summary_fields.cloud_credential.name);
|
||||||
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 });
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
// No existing cloud credential
|
// No existing cloud credential
|
||||||
$scope.$emit('cloudCredentialReady', null);
|
$scope.$emit('cloudCredentialReady', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Wait('start');
|
Wait('start');
|
||||||
|
|||||||
Reference in New Issue
Block a user