diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.service.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.service.js index cc8a9237aa..8ac9b39248 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.service.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.service.js @@ -138,16 +138,16 @@ export default this.url = GetBasePath('inventory_sources') + id + '/hosts/'; Rest.setUrl(this.url); return Rest.destroy() - .success(this.success.bind(this)) - .error(this.error.bind(this)) + .then(this.success.bind(this)) + .catch(this.error.bind(this)) .finally(); }, deleteGroups(id) { this.url = GetBasePath('inventory_sources') + id + '/groups/'; Rest.setUrl(this.url); return Rest.destroy() - .success(this.success.bind(this)) - .error(this.error.bind(this)) + .then(this.success.bind(this)) + .catch(this.error.bind(this)) .finally(); } }; diff --git a/awx/ui/client/src/organizations/list/organizations-list.controller.js b/awx/ui/client/src/organizations/list/organizations-list.controller.js index 6838b9cbd6..7b3ff2488e 100644 --- a/awx/ui/client/src/organizations/list/organizations-list.controller.js +++ b/awx/ui/client/src/organizations/list/organizations-list.controller.js @@ -92,7 +92,7 @@ export default ['$stateParams', '$scope', '$rootScope', $scope.$on("ReloadOrgListView", function() { Rest.setUrl($scope.current_url); Rest.get() - .success((data) => $scope.organizations = data.results) + .then(({data}) => $scope.organizations = data.results) .catch(({data, status}) => { ProcessErrors($scope, data, status, null, { hdr: 'Error!', diff --git a/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js b/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js index 500a7562b0..70bab1727b 100644 --- a/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js +++ b/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js @@ -919,9 +919,9 @@ export default ['$state','moment', '$timeout', '$window', '$filter', 'Rest', 'Ge Rest.setUrl(GetBasePath("unified_jobs") + "?id=" + d.job.id); Rest.get() - .success(function (res) { - if(res.results && res.results.length > 0) { - goToJobResults(res.results[0].type); + .then(function (res) { + if(res.data.results && res.data.results.length > 0) { + goToJobResults(res.data.results[0].type); } }) .catch(({data, status}) => { diff --git a/awx/ui/client/src/workflow-results/workflow-results.route.js b/awx/ui/client/src/workflow-results/workflow-results.route.js index 83e86de83e..84562c4783 100644 --- a/awx/ui/client/src/workflow-results/workflow-results.route.js +++ b/awx/ui/client/src/workflow-results/workflow-results.route.js @@ -58,13 +58,13 @@ export default { // Get the workflow nodes Rest.setUrl(nextUrl); Rest.get() - .success(function(nextData) { - for(var i=0; i