This is an automated email from the ASF dual-hosted git repository.
ppawar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new ac838ccbe ATLAS-5153: React UI: Statistics component displays count as
NaN when total exceeds 999 (#467)
ac838ccbe is described below
commit ac838ccbe00548e152909fe628c1caca3feb1f75
Author: Prasad Pawar <[email protected]>
AuthorDate: Mon Oct 13 18:38:41 2025 +0530
ATLAS-5153: React UI: Statistics component displays count as NaN when total
exceeds 999 (#467)
---
dashboard/src/views/Statistics/EntityStats.tsx | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/dashboard/src/views/Statistics/EntityStats.tsx
b/dashboard/src/views/Statistics/EntityStats.tsx
index c2a0a8398..82df30e78 100644
--- a/dashboard/src/views/Statistics/EntityStats.tsx
+++ b/dashboard/src/views/Statistics/EntityStats.tsx
@@ -168,8 +168,6 @@ const EntityStats = ({
shellEntityCount += intVal;
}
- intVal = numberFormatWithComma(intVal);
-
if (stats[key]) {
stats[key][type] = intVal;
} else {
@@ -360,10 +358,10 @@ const EntityStats = ({
}
}}
>
- <TableCell>{`${key} (${
- Number(!isEmpty(value.active) ? value.active : 0) +
- Number(!isEmpty(value.deleted) ? value.deleted : 0)
- })`}</TableCell>
+ <TableCell>{`${key} (${numberFormatWithComma(
+ Number(value?.active ?? 0) +
+ Number(value?.deleted ?? 0)
+ )})`}</TableCell>
<TableCell>
<LightTooltip
title={`Search for active entities of type '${key}'`}
@@ -376,7 +374,9 @@ const EntityStats = ({
size="small"
color="primary"
>
- {!isEmpty(value.active) ? value.active : 0}
+ {numberFormatWithComma(
+ Number(!isEmpty(value.active) ? value.active :
0)
+ )}
</CustomButton>
</LightTooltip>
</TableCell>
@@ -394,11 +394,13 @@ const EntityStats = ({
color="error"
size="small"
>
- {value.deleted}
+ {numberFormatWithComma(
+ Number(!isEmpty(value.deleted) ? value.deleted
: 0)
+ )}
</CustomButton>
</LightTooltip>
) : (
- 0
+ numberFormatWithComma(0)
)}
</TableCell>
<TableCell>
@@ -415,11 +417,13 @@ const EntityStats = ({
size="small"
color="error"
>
- {value.shell}
+ {numberFormatWithComma(
+ Number(!isEmpty(value.shell) ? value.shell : 0)
+ )}
</CustomButton>
</LightTooltip>
) : (
- 0
+ numberFormatWithComma(0)
)}
</TableCell>
</TableRow>