Adding check for job detail properties

This commit is contained in:
Jared Tabor
2015-01-19 12:08:16 -05:00
parent df68e45e16
commit 91e3374c2d

View File

@@ -202,7 +202,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
scope.removeLoadHostSummaries(); scope.removeLoadHostSummaries();
} }
scope.removeHostSummaries = scope.$on('LoadHostSummaries', function() { scope.removeHostSummaries = scope.$on('LoadHostSummaries', function() {
if(scope.job.related.job_host_summaries){ if(scope.job.related){
var url = scope.job.related.job_host_summaries + '?'; var url = scope.job.related.job_host_summaries + '?';
url += '&page_size=' + scope.hostSummariesMaxRows + '&order=host_name'; url += '&page_size=' + scope.hostSummariesMaxRows + '&order=host_name';
@@ -376,7 +376,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
} }
else { else {
// no next event (task), get the end time of the play // no next event (task), get the end time of the play
end = scope.jobData.plays[scope.activePlay].finished; if(scope.jobData.plays[scope.activePlay]){
end = scope.jobData.plays[scope.activePlay].finished;
}
} }
if (end) { if (end) {