mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 06:29:31 -02:30
Dashboard
Clean up call to ProcessErrors. It should always include scope.
This commit is contained in:
@@ -122,7 +122,8 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Home.$inject = ['$scope', '$compile', '$routeParams', '$rootScope', '$location', 'Wait', 'DashboardCounts', 'HostGraph','JobStatusGraph', 'DashboardJobs', 'ClearScope', 'Stream', 'Rest', 'GetBasePath', 'ProcessErrors', 'Button'
|
Home.$inject = ['$scope', '$compile', '$routeParams', '$rootScope', '$location', 'Wait', 'DashboardCounts', 'HostGraph','JobStatusGraph', 'DashboardJobs',
|
||||||
|
'ClearScope', 'Stream', 'Rest', 'GetBasePath', 'ProcessErrors', 'Button'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ angular.module('HostGraphWidget', ['RestServices', 'Utilities'])
|
|||||||
|
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
//Wait('stWaitop');
|
//Wait('stWaitop');
|
||||||
ProcessErrors(null, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard graph data: ' + status });
|
ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard graph data: ' + status });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (scope.removeLicenseCountReady) {
|
if (scope.removeLicenseCountReady) {
|
||||||
@@ -55,11 +55,10 @@ angular.module('HostGraphWidget', ['RestServices', 'Utilities'])
|
|||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
scope.$emit('hostDataReady', data, license);
|
scope.$emit('hostDataReady', data, license);
|
||||||
|
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
//Wait('stWaitop');
|
//Wait('stWaitop');
|
||||||
ProcessErrors(null, data, status, null, { hdr: 'Error!', msg: 'Failed to get license info ' + status });
|
ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get license info ' + status });
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -72,15 +72,15 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities'])
|
|||||||
url = GetBasePath('dashboard')+'graphs/?period='+period+'&type='+job_type;
|
url = GetBasePath('dashboard')+'graphs/?period='+period+'&type='+job_type;
|
||||||
Rest.setUrl(url);
|
Rest.setUrl(url);
|
||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function (data){
|
.success(function (data){
|
||||||
scope.$emit('graphDataReady', data);
|
scope.$emit('graphDataReady', data);
|
||||||
return job_type, period;
|
return job_type, period;
|
||||||
|
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
//Wait('stWaitop');
|
//Wait('stWaitop');
|
||||||
ProcessErrors(null, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard graph data: ' + status });
|
ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard graph data: ' + status });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
element = angular.element(document.getElementById(target));
|
element = angular.element(document.getElementById(target));
|
||||||
|
|||||||
Reference in New Issue
Block a user