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

Retrieved cloud credential from job template summary fields

This commit is contained in:
Ken Hoes 2016-07-13 15:14:12 -04:00
parent 5c32b17aea
commit 33bb3abd52

View File

@ -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');