This is an automated email from the ASF dual-hosted git repository. ppawar pushed a commit to branch ATLAS-5153 in repository https://gitbox.apache.org/repos/asf/atlas.git
commit 9f3e9a010d3c9e3575ecdef492366f699845ef53 Author: Prasad Pawar <[email protected]> AuthorDate: Thu Oct 9 19:11:16 2025 +0530 ATLAS-5153: React UI: Statistics component displays count as NaN when total exceeds 999 --- 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>
