From adbe2d182fc0b61431880858ec5edc469f0a9d0c Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Wed, 13 Aug 2014 19:16:37 -0400 Subject: [PATCH] Job detail page Added support for the garbled playbook: https://trello.com/c/UA2oIdhd/284-needs-to-be-a-better-indication-when-a-play-is-failed-due-to-syntax-issue-without-events --- awx/ui/static/js/controllers/JobDetail.js | 6 ++++++ awx/ui/static/partials/job_detail.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index 7ce40b93c9..8c4df8edcd 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -435,6 +435,12 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar scope.activePlay = data.results[0].id; } scope.selectedPlay = scope.activePlay; + } else { + // if we are here, there are no plays and the job has failed, let the user know they may want to consult stdout + if (scope.job_status.status === 'failed' || scope.job_status.status === 'error' && + (!scope.job_status.explanation)) { + scope.job_status.explanation = "View stdout for more detail"; + } } data.results.forEach(function(event, idx) { var status, status_text, start, end, elapsed, ok, changed, failed, skipped; diff --git a/awx/ui/static/partials/job_detail.html b/awx/ui/static/partials/job_detail.html index 97f9cc7389..e1d402e5c4 100644 --- a/awx/ui/static/partials/job_detail.html +++ b/awx/ui/static/partials/job_detail.html @@ -32,7 +32,7 @@
{{ job_status.status }}
-
{{ job_status.explanation }}
+