Skip to content

Commit

Permalink
cherry-pick: 5959-fix-error-days
Browse files Browse the repository at this point in the history
Updates #5959.

* commit '4b9264531be50e81fe610050a12827b71bc3a9cd':
  clients: use constant a day in milliseconds
  clients: fix lint
  fix error days
  • Loading branch information
ainar-g committed Jul 3, 2023
1 parent b22b16d commit 19347d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/components/Dashboard/Counters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand Down Expand Up @@ -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,
},
{
Expand Down

0 comments on commit 19347d2

Please sign in to comment.