mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-29 10:28:53 +03:00
- client: fix request count in clients table
This commit is contained in:
parent
40763c903b
commit
289c6f8c73
1 changed files with 5 additions and 5 deletions
|
@ -62,10 +62,10 @@ class ClientsTable extends Component {
|
|||
};
|
||||
};
|
||||
|
||||
getStats = (ip, stats) => {
|
||||
getStats = (ids, stats) => {
|
||||
if (stats) {
|
||||
const statsForCurrentIP = stats.find(item => item.name === ip);
|
||||
return statsForCurrentIP && statsForCurrentIP.count;
|
||||
const currentStats = stats.find(item => ids.includes(item.name));
|
||||
return currentStats && currentStats.count;
|
||||
}
|
||||
|
||||
return '';
|
||||
|
@ -180,8 +180,8 @@ class ClientsTable extends Component {
|
|||
accessor: 'statistics',
|
||||
minWidth: 120,
|
||||
Cell: (row) => {
|
||||
const clientIP = row.original.ip;
|
||||
const clientStats = clientIP && this.getStats(clientIP, this.props.topClients);
|
||||
const { ids } = row.original;
|
||||
const clientStats = this.getStats(ids, this.props.topClients);
|
||||
|
||||
if (clientStats) {
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue