From f88e9cfec1f7319c160862ece98dca8a343bc79c Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 12 Jul 2016 15:44:13 -0700 Subject: [PATCH 1/2] Check for object keys to avoid console error --- awx/ui/client/src/job-detail/job-detail.controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/job-detail/job-detail.controller.js b/awx/ui/client/src/job-detail/job-detail.controller.js index 3f6e8f7209..acb473b088 100644 --- a/awx/ui/client/src/job-detail/job-detail.controller.js +++ b/awx/ui/client/src/job-detail/job-detail.controller.js @@ -428,7 +428,8 @@ export default var params = { order_by: 'id' }; - if (scope.job.summary_fields.unified_job_template.unified_job_type === 'job'){ + + if (scope.job && scope.job.summary_fields && scope.job.summary_fields.unified_job_template && scope.job.summary_fields.unified_job_template.unified_job_type === 'job'){ JobDetailService.getJobPlays(scope.job.id, params) .success( function(data) { scope.next_plays = data.next; From c6aa2b43921d7e877cf1a4e3c3f77fee42a18b25 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 12 Jul 2016 16:03:31 -0700 Subject: [PATCH 2/2] removing logic in job detail page related to scm updates job detail page is only for job runs, scm updates have their own stdout page --- awx/ui/client/src/job-detail/job-detail.controller.js | 2 -- awx/ui/client/src/job-detail/job-detail.partial.html | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/job-detail/job-detail.controller.js b/awx/ui/client/src/job-detail/job-detail.controller.js index acb473b088..02cb21a5f1 100644 --- a/awx/ui/client/src/job-detail/job-detail.controller.js +++ b/awx/ui/client/src/job-detail/job-detail.controller.js @@ -429,7 +429,6 @@ export default order_by: 'id' }; - if (scope.job && scope.job.summary_fields && scope.job.summary_fields.unified_job_template && scope.job.summary_fields.unified_job_template.unified_job_type === 'job'){ JobDetailService.getJobPlays(scope.job.id, params) .success( function(data) { scope.next_plays = data.next; @@ -515,7 +514,6 @@ export default } scope.$emit('LoadTasks', events_url); }); - } }); diff --git a/awx/ui/client/src/job-detail/job-detail.partial.html b/awx/ui/client/src/job-detail/job-detail.partial.html index a5590ebd5e..0be9e4eb6b 100644 --- a/awx/ui/client/src/job-detail/job-detail.partial.html +++ b/awx/ui/client/src/job-detail/job-detail.partial.html @@ -164,7 +164,7 @@ -