mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
add explanation and result traceback to details page for failed jobs
This commit is contained in:
parent
1c19924b9a
commit
7a668c9089
@ -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 = "<a href=\"/#/jobs/" + scope.job_id + "/stdout\" target=\"_blank\">View stdout for more detail <i class=\"fa fa-external-link\"></i></a>";
|
||||
}
|
||||
@ -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;
|
||||
|
||||
@ -30,12 +30,21 @@
|
||||
<div class="form-horizontal" role="form" id="job-status-form">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Status</label>
|
||||
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-4"><i class="fa icon-job-{{ job_status.status }}"></i> {{ job_status.status }}</div>
|
||||
<div class="col-lg-8 col-md-7 col-sm-6 col-xs-5" ng-bind-html="job_status.explanation"></div>
|
||||
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-12 control-label">Status</label>
|
||||
<div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 job_status"><i class="fa icon-job-{{ job_status.status }}"></i> {{ job_status.status }}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group" ng-show="job_status.explanation">
|
||||
<label class="col-lg-2 col-md-12 col-sm-12 col-xs-12">Explanation</label>
|
||||
<div class="col-lg-10 col-md-12 col-sm-12 col-xs-12 job_status_explanation" ng-bind-html="job_status.explanation"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="job_status.traceback">
|
||||
<label class="col-lg-2 col-md-12 col-sm-12 col-xs-12">Results Traceback</label>
|
||||
<div class="col-lg-10 col-md-12 col-sm-12 col-xs-12 job_status_traceback" ng-bind-html="job_status.traceback"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="job_status.started">
|
||||
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Timing</label>
|
||||
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-9">
|
||||
<div ng-show="job_status.started" id="started-time">Started {{ job_status.started | date:'MM/dd/yy HH:mm:ss' }}</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user