From acbad67f478f2381c83bd853e45b167336562fe0 Mon Sep 17 00:00:00 2001 From: bankjirapan Date: Tue, 21 Jan 2025 14:16:22 +0700 Subject: [PATCH 1/3] refactor: Format value clientstats --- client/src/components/Settings/Clients/AutoClients.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Settings/Clients/AutoClients.tsx b/client/src/components/Settings/Clients/AutoClients.tsx index f633f76a..4f6d8114 100644 --- a/client/src/components/Settings/Clients/AutoClients.tsx +++ b/client/src/components/Settings/Clients/AutoClients.tsx @@ -12,7 +12,7 @@ import whoisCell from './whoisCell'; import LogsSearchLink from '../../ui/LogsSearchLink'; -import { sortIp } from '../../../helpers/helpers'; +import { sortIp, formatNumber } from '../../../helpers/helpers'; import { LocalStorageHelper, LOCAL_STORAGE_KEYS } from '../../../helpers/localStorageHelper'; import { TABLES_MIN_ROWS } from '../../../helpers/constants'; @@ -66,7 +66,7 @@ class AutoClients extends Component { return (
- {clientStats} + {formatNumber(clientStats)}
); From 84d72cb8424bb8087e0d38dcc22196d1b9f7112b Mon Sep 17 00:00:00 2001 From: bankjirapan Date: Tue, 21 Jan 2025 14:45:31 +0700 Subject: [PATCH 2/3] refactor: Format value requests_count on client table --- .../Settings/Clients/ClientsTable/ClientsTable.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/Settings/Clients/ClientsTable/ClientsTable.tsx b/client/src/components/Settings/Clients/ClientsTable/ClientsTable.tsx index 9dfe319d..55d3e72f 100644 --- a/client/src/components/Settings/Clients/ClientsTable/ClientsTable.tsx +++ b/client/src/components/Settings/Clients/ClientsTable/ClientsTable.tsx @@ -12,7 +12,7 @@ import ReactTable from 'react-table'; import { getAllBlockedServices, getBlockedServices } from '../../../../actions/services'; import { initSettings } from '../../../../actions'; -import { splitByNewLine, countClientsStatistics, sortIp, getService } from '../../../../helpers/helpers'; +import { splitByNewLine, countClientsStatistics, sortIp, getService, formatNumber } from '../../../../helpers/helpers'; import { MODAL_TYPE, LOCAL_TIMEZONE_VALUE, TABLES_MIN_ROWS } from '../../../../helpers/constants'; import Card from '../../../ui/Card'; @@ -300,12 +300,12 @@ const ClientsTable = ({ sortMethod: (a: any, b: any) => b - a, minWidth: 120, Cell: (row: any) => { - const content = CellWrap(row); + let content = CellWrap(row); if (!row.value) { return content; } - + content = typeof content === "number" ? formatNumber(content) : content; return {content}; }, }, From e9d4e76828261622dfb424c760246a21b73040e8 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Thu, 20 Feb 2025 18:55:24 +0300 Subject: [PATCH 3/3] all: upd chlog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f08b6993..f1e5d85b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,12 @@ See also the [v0.107.58 GitHub milestone][ms-v0.107.58]. NOTE: Add new changes BELOW THIS COMMENT. --> +### Fixed + +- The formatting of large numbers in the clients tables on the *Client settings* page ([#7583]). + +[#7583]: https://github.com/AdguardTeam/AdGuardHome/issues/7583 +