From 19347d263a3b1eee866692c837d985e7bd294b13 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Mon, 3 Jul 2023 14:34:19 +0300 Subject: [PATCH] cherry-pick: 5959-fix-error-days Updates #5959. * commit '4b9264531be50e81fe610050a12827b71bc3a9cd': clients: use constant a day in milliseconds clients: fix lint fix error days --- client/src/components/Dashboard/Counters.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/Dashboard/Counters.js b/client/src/components/Dashboard/Counters.js index 2434bb8c..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,12 +54,12 @@ const Counters = ({ refreshButton, subtitle }) => { avgProcessingTime, } = useSelector((state) => state.stats, shallowEqual); const { t } = useTranslation(); - + const days = interval / DAY; const rows = [ { label: 'dns_query', count: numDnsQueries, - tooltipTitle: interval === 1 ? 'number_of_dns_query_24_hours' : t('number_of_dns_query_days', { count: interval }), + tooltipTitle: days === 1 ? 'number_of_dns_query_24_hours' : t('number_of_dns_query_days', { count: days }), response_status: RESPONSE_FILTER.ALL.QUERY, }, {