From 51340adb361ab591f0424caf3da2e0dfaf97d50d Mon Sep 17 00:00:00 2001 From: Stanislav Chzhen Date: Mon, 4 Sep 2023 15:12:58 +0300 Subject: [PATCH] Pull request 1990: 5793-fix-stats-date Updates #5793. Squashed commit of the following: commit 6ad10c000a00c23574342bd01f2cfe91b8eeaac3 Author: Stanislav Chzhen Date: Mon Sep 4 13:08:22 2023 +0300 all: upd chlog commit ab579d9cdc1b9f24015c8abff618c9ffe4d4f602 Author: Stanislav Chzhen Date: Fri Sep 1 19:39:00 2023 +0300 client: fix stats date --- CHANGELOG.md | 2 ++ client/src/components/ui/Line.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bc29610..4a554fe6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -143,6 +143,7 @@ In this release, the schema version has changed from 24 to 26. ### Fixed +- Incorrect display date on statistics graph ([#5793]). - Missing query log entries and statistics on service restart ([#6100]). - Occasional DNS-over-QUIC and DNS-over-HTTP/3 errors ([#6133]). - Legacy DNS rewrites containing IPv4-mapped IPv6 addresses are now matching the @@ -155,6 +156,7 @@ In this release, the schema version has changed from 24 to 26. [#1453]: https://github.com/AdguardTeam/AdGuardHome/issues/1453 [#2998]: https://github.com/AdguardTeam/AdGuardHome/issues/2998 [#3701]: https://github.com/AdguardTeam/AdGuardHome/issues/3701 +[#5793]: https://github.com/AdguardTeam/AdGuardHome/issues/5793 [#5948]: https://github.com/AdguardTeam/AdGuardHome/issues/5948 [#6020]: https://github.com/AdguardTeam/AdGuardHome/issues/6020 [#6050]: https://github.com/AdguardTeam/AdGuardHome/issues/6050 diff --git a/client/src/components/ui/Line.js b/client/src/components/ui/Line.js index ffc218d7..6e13b2e3 100644 --- a/client/src/components/ui/Line.js +++ b/client/src/components/ui/Line.js @@ -44,7 +44,7 @@ const Line = ({ enableGridY={false} enablePoints={false} xFormat={(x) => { - if (interval === 1 || interval === 7) { + if (interval >= 0 && interval <= 7) { const hoursAgo = subHours(Date.now(), 24 * interval); return dateFormat(addHours(hoursAgo, x), 'D MMM HH:00'); }