mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
fix status list for client-generated status counts
This commit is contained in:
parent
7f27a3c74d
commit
87fccb9f45
@ -7,6 +7,7 @@ const TASK_START = 'playbook_on_task_start';
|
||||
const HOST_STATUS_KEYS = ['dark', 'failures', 'changed', 'ok', 'skipped'];
|
||||
const COMPLETE = ['successful', 'failed'];
|
||||
const INCOMPLETE = ['canceled', 'error'];
|
||||
const UNSUCCESSFUL = ['failed'].concat(INCOMPLETE);
|
||||
const FINISHED = COMPLETE.concat(INCOMPLETE);
|
||||
|
||||
function JobStatusService (moment, message) {
|
||||
@ -61,12 +62,12 @@ function JobStatusService (moment, message) {
|
||||
};
|
||||
|
||||
this.createHostStatusCounts = status => {
|
||||
if (_.includes(COMPLETE, status)) {
|
||||
return { ok: 1 };
|
||||
if (UNSUCCESSFUL.includes(status)) {
|
||||
return { failures: 1 };
|
||||
}
|
||||
|
||||
if (_.includes(INCOMPLETE, status)) {
|
||||
return { failures: 1 };
|
||||
if (COMPLETE.includes(status)) {
|
||||
return { ok: 1 };
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user