From ea8bf8e7cda76cea36c32b982179ed03ee6c7474 Mon Sep 17 00:00:00 2001 From: Phil Renaud Date: Tue, 20 Jun 2023 15:03:46 -0400 Subject: [PATCH] Specific health_unknown getter that only looks at running allocs (#17566) --- ui/app/components/job-status/panel/deploying.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/app/components/job-status/panel/deploying.js b/ui/app/components/job-status/panel/deploying.js index aae6936f4..759e5dada 100644 --- a/ui/app/components/job-status/panel/deploying.js +++ b/ui/app/components/job-status/panel/deploying.js @@ -187,6 +187,13 @@ export default class JobStatusPanelDeployingComponent extends Component { ]; } + get newRunningHealthUnknownAllocBlocks() { + return [ + ...this.newVersionAllocBlocks['running']['health_unknown']['canary'], + ...this.newVersionAllocBlocks['running']['health_unknown']['nonCanary'], + ]; + } + get rescheduledAllocs() { return this.job.allocations.filter((a) => !a.isOld && a.hasBeenRescheduled); } @@ -222,10 +229,7 @@ export default class JobStatusPanelDeployingComponent extends Component { return { healthy: this.newRunningHealthyAllocBlocks.length, unhealthy: this.newRunningUnhealthyAllocBlocks.length, - health_unknown: - this.totalAllocs - - this.newRunningHealthyAllocBlocks.length - - this.newRunningUnhealthyAllocBlocks.length, + health_unknown: this.newRunningHealthUnknownAllocBlocks.length, }; } // #endregion legend