mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-12-20 01:11:03 +08:00
Merge branch 'master' into ADG-9415
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
lint / notify (push) Has been cancelled
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
lint / notify (push) Has been cancelled
This commit is contained in:
@@ -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
|
||||
|
||||
<!--
|
||||
NOTE: Add new changes ABOVE THIS COMMENT.
|
||||
-->
|
||||
|
||||
@@ -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<AutoClientsProps> {
|
||||
return (
|
||||
<div className="logs__row">
|
||||
<div className="logs__text" title={clientStats}>
|
||||
<LogsSearchLink search={row.original.ip}>{clientStats}</LogsSearchLink>
|
||||
<LogsSearchLink search={row.original.ip}>{formatNumber(clientStats)}</LogsSearchLink>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -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';
|
||||
@@ -306,12 +306,15 @@ const ClientsTable = ({
|
||||
sortMethod: (a: any, b: any) => b - a,
|
||||
minWidth: 120,
|
||||
Cell: (row: any) => {
|
||||
const content = CellWrap(row);
|
||||
|
||||
if (!row.value) {
|
||||
return content;
|
||||
let content = row.value;
|
||||
if (typeof content === "number") {
|
||||
content = formatNumber(content);
|
||||
} else {
|
||||
content = CellWrap(row);
|
||||
}
|
||||
|
||||
if (!content) {
|
||||
return content;
|
||||
}
|
||||
return <LogsSearchLink search={row.original.name}>{content}</LogsSearchLink>;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user