From ed85df52f0836f140d9a5dce1940767375551aba Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 14 Aug 2015 13:10:15 -0700 Subject: [PATCH] Job detail page: increment hostCount if missing occassionally the hostCount will not get incremented despite a host result being processed as successful, failed, skipped, unreachable, or changed. This cause the UI not to show the host status --- awx/ui/client/src/helpers/JobDetail.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/helpers/JobDetail.js b/awx/ui/client/src/helpers/JobDetail.js index 538110aca8..3977c26bb9 100644 --- a/awx/ui/client/src/helpers/JobDetail.js +++ b/awx/ui/client/src/helpers/JobDetail.js @@ -658,7 +658,12 @@ export default var task = params.task, diff; - task.missingCount = task.hostCount - (task.failedCount + task.changedCount + task.skippedCount + task.successfulCount + task.unreachableCount); + task.missingCount = task.hostCount - (task.failedCount + task.changedCount + task.skippedCount + task.successfulCount + + task.unreachableCount); + if(task.missingCount<0){ + task.hostCount = (task.failedCount + task.changedCount + task.skippedCount + task.successfulCount + + task.unreachableCount); + } task.missingPct = (task.hostCount > 0) ? Math.ceil((100 * (task.missingCount / task.hostCount))) : 0; task.failedPct = (task.hostCount > 0) ? Math.ceil((100 * (task.failedCount / task.hostCount))) : 0; task.changedPct = (task.hostCount > 0) ? Math.ceil((100 * (task.changedCount / task.hostCount))) : 0;