Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: shamoon <[email protected]>
  • Loading branch information
fcornelius and shamoon authored Nov 19, 2024
1 parent d08383d commit 63e0765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@
"argocd": {
"apps": "Apps",
"synced": "Synced",
"outOfSync": "OutOfSync",
"outOfSync": "Out Of Sync",
"healthy": "Healthy",
"degraded": "Degraded",
"progressing": "Progressing",
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/argocd/component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
});
Expand Down

0 comments on commit 63e0765

Please sign in to comment.