mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Job detail page
Fixed https://trello.com/c/3AIlW5Hy/335-elapsed-time-disappears-when-job-is-completed
This commit is contained in:
parent
5e0917cd92
commit
4a9ce25dff
@ -348,9 +348,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
|
|||||||
play.hostCount = (event.host_count) ? event.host_count : 0;
|
play.hostCount = (event.host_count) ? event.host_count : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx < data.length - 1) {
|
if (idx < data.results.length - 1) {
|
||||||
// end date = starting date of the next event
|
// end date = starting date of the next event
|
||||||
end = data[idx + 1].created;
|
end = data.results[idx + 1].created;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// no next event (task), get the end time of the play
|
// no next event (task), get the end time of the play
|
||||||
@ -466,9 +466,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
|
|||||||
status_text = (event.failed) ? 'Failed' : (event.changed) ? 'Changed' : 'OK';
|
status_text = (event.failed) ? 'Failed' : (event.changed) ? 'Changed' : 'OK';
|
||||||
start = event.started;
|
start = event.started;
|
||||||
|
|
||||||
if (idx < data.length - 1) {
|
if (idx < data.results.length - 1) {
|
||||||
// end date = starting date of the next event
|
// end date = starting date of the next event
|
||||||
end = data[idx + 1].started;
|
end = data.results[idx + 1].started;
|
||||||
}
|
}
|
||||||
else if (JobIsFinished(scope)) {
|
else if (JobIsFinished(scope)) {
|
||||||
// this is the last play and the job already finished
|
// this is the last play and the job already finished
|
||||||
@ -627,7 +627,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
|
|||||||
scope.job_status.explanation = data.job_explanation;
|
scope.job_status.explanation = data.job_explanation;
|
||||||
|
|
||||||
if (data.status === 'successful' || data.status === 'failed' || data.status === 'error' || data.status === 'canceled') {
|
if (data.status === 'successful' || data.status === 'failed' || data.status === 'error' || data.status === 'canceled') {
|
||||||
scope.job_status.finished = data.finsished;
|
scope.job_status.finished = data.finished;
|
||||||
scope.liveEventProcessing = false;
|
scope.liveEventProcessing = false;
|
||||||
scope.pauseLiveEvents = false;
|
scope.pauseLiveEvents = false;
|
||||||
scope.waiting = false;
|
scope.waiting = false;
|
||||||
@ -1011,9 +1011,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
|
|||||||
status_text = (event.failed) ? 'Failed' : (event.changed) ? 'Changed' : 'OK';
|
status_text = (event.failed) ? 'Failed' : (event.changed) ? 'Changed' : 'OK';
|
||||||
start = event.started;
|
start = event.started;
|
||||||
|
|
||||||
if (idx < data.length - 1) {
|
if (idx < data.results.length - 1) {
|
||||||
// end date = starting date of the next event
|
// end date = starting date of the next event
|
||||||
end = data[idx + 1].started;
|
end = data.results[idx + 1].started;
|
||||||
}
|
}
|
||||||
else if (JobIsFinished(scope)) {
|
else if (JobIsFinished(scope)) {
|
||||||
// this is the last play and the job already finished
|
// this is the last play and the job already finished
|
||||||
@ -1072,9 +1072,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
|
|||||||
scope.next_tasks = data.next;
|
scope.next_tasks = data.next;
|
||||||
data.results.forEach(function(event, idx) {
|
data.results.forEach(function(event, idx) {
|
||||||
var end, elapsed, status, status_text;
|
var end, elapsed, status, status_text;
|
||||||
if (idx < data.length - 1) {
|
if (idx < data.results.length - 1) {
|
||||||
// end date = starting date of the next event
|
// end date = starting date of the next event
|
||||||
end = data[idx + 1].created;
|
end = data.results[idx + 1].created;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// no next event (task), get the end time of the play
|
// no next event (task), get the end time of the play
|
||||||
|
@ -720,9 +720,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
|||||||
status_text = (event.failed) ? 'Failed' : (event.changed) ? 'Changed' : 'OK';
|
status_text = (event.failed) ? 'Failed' : (event.changed) ? 'Changed' : 'OK';
|
||||||
start = event.started;
|
start = event.started;
|
||||||
|
|
||||||
if (idx < data.length - 1) {
|
if (idx < data.results.length - 1) {
|
||||||
// end date = starting date of the next event
|
// end date = starting date of the next event
|
||||||
end = data[idx + 1].started;
|
end = data.results[idx + 1].started;
|
||||||
}
|
}
|
||||||
else if (JobIsFinished(scope)) {
|
else if (JobIsFinished(scope)) {
|
||||||
// this is the last play and the job already finished
|
// this is the last play and the job already finished
|
||||||
@ -832,9 +832,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
|||||||
play.hostCount = (event.host_count) ? event.host_count : 0;
|
play.hostCount = (event.host_count) ? event.host_count : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx < data.length - 1) {
|
if (idx < data.results.length - 1) {
|
||||||
// end date = starting date of the next event
|
// end date = starting date of the next event
|
||||||
end = data[idx + 1].created;
|
end = data.resuls[idx + 1].created;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// no next event (task), get the end time of the play
|
// no next event (task), get the end time of the play
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Started</label>
|
<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 class="col-lg-10 col-md-10 col-sm-10 col-xs-9">
|
||||||
<div ng-show="job_status.started" id="started-time">{{ job_status.started | date:'MM/dd/yy HH:mm:ss' }}</div>
|
<div ng-show="job_status.started" id="started-time">Started {{ job_status.started | date:'MM/dd/yy HH:mm:ss' }}</div>
|
||||||
<div ng-show="job_status.finished" id="finished-time">Finished {{ job_status.finished | date:'MM/dd/yy HH:mm:ss' }}</div>
|
<div ng-show="job_status.finished" id="finished-time">Finished {{ job_status.finished | date:'MM/dd/yy HH:mm:ss' }}</div>
|
||||||
<div ng-show="job_status.finished" id="elapsed-time">Elapsed {{ job_status.elapsed }}</div>
|
<div ng-show="job_status.finished" id="elapsed-time">Elapsed {{ job_status.elapsed }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user