Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added comma separators to numbers #7233

Merged
merged 14 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to the Wazuh app project will be documented in this file.
### Added

- Support for Wazuh 4.10.1
- Added comma separators to numbers [#7233](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7233)

## Wazuh v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 08

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function ChartLegend({ data }: ChartLegendProps) {
textOverflow: 'ellipsis',
overflow: 'hidden',
}}
>{`${label} (${value})`}</div>
>{`${label} (${Number(value).toLocaleString('en-US')})`}</div>
),
icon: <EuiIcon type='dot' size='l' color={labelColor} />,
...rest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ export function TableWzAPI({
{isLoading ? (
<EuiLoadingSpinner size='s' />
) : (
<span>({totalItems})</span>
<span>
({Number(totalItems).toLocaleString('en-US')})
</span>
)}
</h1>
</EuiTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const OverviewCards = ({
onClick={goNodes}
style={{ height: 'auto' }}
>
{nodesCount}
{Number(nodesCount).toLocaleString('en-US')}
</EuiButtonEmpty>
</EuiToolTip>
),
Expand Down Expand Up @@ -187,7 +187,7 @@ export const OverviewCards = ({
onClick={goAgents}
style={{ height: 'auto' }}
>
{agentsCount}
{Number(agentsCount).toLocaleString('en-US')}
</EuiButtonEmpty>
</EuiToolTip>
),
Expand Down
JuanGarriuz marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ exports[`Stats component renders correctly to match the snapshot 1`] = `
rel="noreferrer"
style="font-weight: normal; color: rgb(189, 39, 30);"
>
-
NaN
</a>
</span>
</p>
Expand Down Expand Up @@ -180,7 +180,7 @@ exports[`Stats component renders correctly to match the snapshot 1`] = `
rel="noreferrer"
style="font-weight: normal; color: rgb(254, 197, 20);"
>
-
NaN
</a>
</span>
</p>
Expand Down Expand Up @@ -225,7 +225,7 @@ exports[`Stats component renders correctly to match the snapshot 1`] = `
rel="noreferrer"
style="font-weight: normal; color: rgb(96, 146, 192);"
>
-
NaN
</a>
</span>
</p>
Expand Down Expand Up @@ -270,7 +270,7 @@ exports[`Stats component renders correctly to match the snapshot 1`] = `
rel="noreferrer"
style="font-weight: normal; color: rgb(0, 120, 113);"
>
-
NaN
</a>
</span>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function LastAlertsStat({
}}
href={discoverLocation}
>
{statValue}
{Number(statValue).toLocaleString('en-US')}
JuanGarriuz marked this conversation as resolved.
Show resolved Hide resolved
</EuiLink>
</EuiToolTip>
}
Expand Down
Loading