From 4b9264531be50e81fe610050a12827b71bc3a9cd Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Mon, 3 Jul 2023 14:29:33 +0300 Subject: [PATCH] clients: use constant a day in milliseconds --- client/src/components/Dashboard/Counters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Dashboard/Counters.js b/client/src/components/Dashboard/Counters.js index 3b05e074..69702c32 100644 --- a/client/src/components/Dashboard/Counters.js +++ b/client/src/components/Dashboard/Counters.js @@ -6,7 +6,7 @@ import { shallowEqual, useSelector } from 'react-redux'; import Card from '../ui/Card'; import { formatNumber } from '../../helpers/helpers'; import LogsSearchLink from '../ui/LogsSearchLink'; -import { RESPONSE_FILTER } from '../../helpers/constants'; +import { RESPONSE_FILTER, DAY } from '../../helpers/constants'; import Tooltip from '../ui/Tooltip'; const Row = ({ @@ -54,7 +54,7 @@ const Counters = ({ refreshButton, subtitle }) => { avgProcessingTime, } = useSelector((state) => state.stats, shallowEqual); const { t } = useTranslation(); - const days = interval / (1000 * 60 * 60 * 24); + const days = interval / DAY; const rows = [ { label: 'dns_query',