error handling in Job Detail page

a JS error can get thrown if the user navigates to the job detail page as a job is ending
This commit is contained in:
Jared Tabor
2015-01-16 16:00:58 -05:00
parent e49159af00
commit aae9e2c14b

View File

@@ -202,6 +202,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
scope.removeLoadHostSummaries();
}
scope.removeHostSummaries = scope.$on('LoadHostSummaries', function() {
if(scope.job.related.job_host_summaries){
var url = scope.job.related.job_host_summaries + '?';
url += '&page_size=' + scope.hostSummariesMaxRows + '&order=host_name';
@@ -237,6 +238,8 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
msg: 'Call to ' + url + '. GET returned: ' + status });
});
}
});
if (scope.removeLoadHosts) {