From 5d64896aa51cee6d0c74b60264d6df6f5b771898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=92=E1=85=A7=E1=86=AB=E1=84=89=E1=85=B3=E1=86=BC?= =?UTF-8?q?=E1=84=92=E1=85=A9?= <> Date: Mon, 3 Feb 2025 14:49:40 +0900 Subject: [PATCH] fix: Correction of issues that are calculated when active is negative and total active is incorrectly marked --- cli/script/command-executor.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/script/command-executor.ts b/cli/script/command-executor.ts index 5e37358..ecaf4b8 100644 --- a/cli/script/command-executor.ts +++ b/cli/script/command-executor.ts @@ -566,7 +566,9 @@ export function execute(command: cli.ICommand) { function getTotalActiveFromDeploymentMetrics(metrics: DeploymentMetrics): number { let totalActive = 0; Object.keys(metrics).forEach((label: string) => { - totalActive += metrics[label].active; + if (metrics[label].active > 0) { + totalActive += metrics[label].active; + } }); return totalActive;