From 7a668c908933328a76581d38feca3d40557f0cba Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Fri, 23 Jan 2015 11:36:38 -0500 Subject: [PATCH] add explanation and result traceback to details page for failed jobs --- awx/ui/static/js/controllers/JobDetail.js | 6 ++++-- awx/ui/static/partials/job_detail.html | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index a6a651cd49..0812d8f1ba 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -478,7 +478,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar 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' && + if ( (scope.job_status.status === 'failed' || scope.job_status.status === 'error') && (!scope.job_status.explanation)) { scope.job_status.explanation = "View stdout for more detail "; } @@ -671,7 +671,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar scope.job_status.started = data.started; scope.job_status.status_class = ((data.status === 'error' || data.status === 'failed') && data.job_explanation) ? "alert alert-danger" : ""; scope.job_status.explanation = data.job_explanation; - + if(data.result_traceback) { + scope.job_status.traceback = data.result_traceback; + } if (data.status === 'successful' || data.status === 'failed' || data.status === 'error' || data.status === 'canceled') { scope.job_status.finished = data.finished; scope.liveEventProcessing = false; diff --git a/awx/ui/static/partials/job_detail.html b/awx/ui/static/partials/job_detail.html index 68142f2523..0787dddbf9 100644 --- a/awx/ui/static/partials/job_detail.html +++ b/awx/ui/static/partials/job_detail.html @@ -30,12 +30,21 @@
- -
{{ job_status.status }}
-
+ +
{{ job_status.status }}
-
+
+ +
+
+ +
+ +
+
+ +
Started  {{ job_status.started | date:'MM/dd/yy HH:mm:ss' }}