From de5649e2356f2a97a714f4105b21eea4413d0d3f Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Wed, 21 May 2025 15:06:35 +0300 Subject: [PATCH] Pull request 2413: 2945-fix-stats-in-client-table Updates #2945. Squashed commit of the following: commit 305026dd1113636e06ef43b57c8382e989980d0a Author: Ainar Garipov Date: Wed May 21 14:37:58 2025 +0300 all: upd chlog commit bb8288c0b6d4f758afac1d39599fcac2da2371ae Author: Ainar Garipov Date: Wed May 21 14:31:04 2025 +0300 client: fix types in helper --- CHANGELOG.md | 7 +++++-- client/src/helpers/helpers.tsx | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e5b9645..4c6e0a2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,12 +31,15 @@ See also the [v0.107.62 GitHub milestone][ms-v0.107.62]. ### Fixed +- Clients with CIDR identifiers showing zero requests on the *Settings → Client settings* page ([#2945]). + - Command line option `--update` when the `dns.serve_plain_dns` configuration property was disabled ([#7801]). - DNS cache not working for custom upstream configurations. - Validation process for the DNS-over-TLS, DNS-over-QUIC, and HTTPS ports on the *Encryption Settings* page. +[#2945]: https://github.com/AdguardTeam/AdGuardHome/issues/2945 [#7801]: https://github.com/AdguardTeam/AdGuardHome/issues/7801 [go-1.24.3]: https://groups.google.com/g/golang-announce/c/UZoIkUT367A @@ -2826,7 +2829,7 @@ See also the [v0.106.0 GitHub milestone][ms-v0.106.0]. - Quality of logging ([#2954]). -- Normalization of hostnames sent by DHCP clients ([#2945], [#2952]). +- Normalization of hostnames sent by DHCP clients ([#2946], [#2952]). - The access to the private hosts is now forbidden for users from external networks ([#2889]). @@ -2886,7 +2889,7 @@ See also the [v0.106.0 GitHub milestone][ms-v0.106.0]. [#2923]: https://github.com/AdguardTeam/AdGuardHome/issues/2923 [#2927]: https://github.com/AdguardTeam/AdGuardHome/issues/2927 [#2934]: https://github.com/AdguardTeam/AdGuardHome/issues/2934 -[#2945]: https://github.com/AdguardTeam/AdGuardHome/issues/2945 +[#2946]: https://github.com/AdguardTeam/AdGuardHome/issues/2946 [#2947]: https://github.com/AdguardTeam/AdGuardHome/issues/2947 [#2952]: https://github.com/AdguardTeam/AdGuardHome/issues/2952 [#2954]: https://github.com/AdguardTeam/AdGuardHome/issues/2954 diff --git a/client/src/helpers/helpers.tsx b/client/src/helpers/helpers.tsx index a956bce2..d4000c9d 100644 --- a/client/src/helpers/helpers.tsx +++ b/client/src/helpers/helpers.tsx @@ -654,7 +654,7 @@ export const countClientsStatistics = (ids: any, autoClients: any) => { const cidrsCount = Object.entries(autoClients).reduce((acc: any, curr: any) => { const [id, count] = curr; if (!ipaddr.isValid(id)) { - return false; + return acc; } if (cidrs.some((cidr: any) => isIpInCidr(id, cidr))) { // eslint-disable-next-line no-param-reassign