Merge: - client: fix request count in clients table
* commit '289c6f8c731f616c73eac2739b572c13eb245680': - client: fix request count in clients table
This commit is contained in:
commit
92141e03c4
|
@ -62,10 +62,10 @@ class ClientsTable extends Component {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
getStats = (ip, stats) => {
|
getStats = (ids, stats) => {
|
||||||
if (stats) {
|
if (stats) {
|
||||||
const statsForCurrentIP = stats.find(item => item.name === ip);
|
const currentStats = stats.find(item => ids.includes(item.name));
|
||||||
return statsForCurrentIP && statsForCurrentIP.count;
|
return currentStats && currentStats.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
@ -180,8 +180,8 @@ class ClientsTable extends Component {
|
||||||
accessor: 'statistics',
|
accessor: 'statistics',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
Cell: (row) => {
|
Cell: (row) => {
|
||||||
const clientIP = row.original.ip;
|
const { ids } = row.original;
|
||||||
const clientStats = clientIP && this.getStats(clientIP, this.props.topClients);
|
const clientStats = this.getStats(ids, this.props.topClients);
|
||||||
|
|
||||||
if (clientStats) {
|
if (clientStats) {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue