From 63e07652a0c67d93f22c66566f0e92c862443739 Mon Sep 17 00:00:00 2001 From: Felix Cornelius <9767036+fcornelius@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:36:05 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- public/locales/en/common.json | 2 +- src/widgets/argocd/component.jsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index e38b5dd0c..ab7dcfc92 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -992,7 +992,7 @@ "argocd": { "apps": "Apps", "synced": "Synced", - "outOfSync": "OutOfSync", + "outOfSync": "Out Of Sync", "healthy": "Healthy", "degraded": "Degraded", "progressing": "Progressing", diff --git a/src/widgets/argocd/component.jsx b/src/widgets/argocd/component.jsx index 39349f83b..4421ebeb7 100644 --- a/src/widgets/argocd/component.jsx +++ b/src/widgets/argocd/component.jsx @@ -20,9 +20,8 @@ export default function Component({ service }) { if (status === "apps") { return { status, count: appsData?.items?.length }; } - const apiStatus = status.charAt(0).toUpperCase() + status.slice(1); const count = appsData?.items?.filter( - (item) => item.status?.sync?.status === apiStatus || item.status?.health?.status === apiStatus, + (item) => item.status?.sync?.status.toLowerCase() === status.toLowerCase() || item.status?.health?.status.toLowerCase() === status.toLowerCase(), ).length; return { status, count }; });