From 91e3374c2d5ee63a2266c3e5b5492642dfdda6e5 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 19 Jan 2015 12:08:16 -0500 Subject: [PATCH] Adding check for job detail properties --- awx/ui/static/js/controllers/JobDetail.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index 43deba8196..a6a651cd49 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -202,7 +202,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar scope.removeLoadHostSummaries(); } 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 + '?'; url += '&page_size=' + scope.hostSummariesMaxRows + '&order=host_name'; @@ -376,7 +376,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar } else { // 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) {