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

update host graph when jobs complete

This commit is contained in:
John Mitchell 2015-07-27 09:07:15 -04:00
parent 4f73ba9e3e
commit d56ab2b18b

View File

@ -29,6 +29,15 @@ export function Home($scope, $compile, $routeParams, $rootScope, $location, $log
var dataCount = 0;
$rootScope.$on('JobStatusChange-home', function () {
Rest.setUrl(GetBasePath('dashboard'));
Rest.get()
.success(function (data) {
$scope.dashboardData = data;
})
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard host graph data: ' + status });
});
Rest.setUrl(GetBasePath("jobs") + "?order_by=-finished&page_size=5&finished__isnull=false");
Rest.get()
.success(function (data) {
@ -37,6 +46,7 @@ export function Home($scope, $compile, $routeParams, $rootScope, $location, $log
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard jobs list: ' + status });
});
Rest.setUrl(GetBasePath("job_templates") + "?order_by=-last_job_run&page_size=5&last_job_run__isnull=false");
Rest.get()
.success(function (data) {
@ -45,6 +55,7 @@ export function Home($scope, $compile, $routeParams, $rootScope, $location, $log
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard jobs list: ' + status });
});
});
if ($scope.removeDashboardDataLoadComplete) {