6296 fix charts and custom retention labels

Updates #6296

Squashed commit of the following:

commit e6a36f107b7bdd17fe4141b035fe5c1f6edd5c6c
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Oct 13 17:42:41 2023 +0300

    changelog

commit 96f11f2090d2aff600f6dcd6ca601e25cd857530
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Oct 13 16:01:27 2023 +0300

    changelog

commit 136fb14f61dcb2bdec3bc9b8943a05544752a606
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Oct 13 15:20:14 2023 +0300

    ADG-7598 fix charts and custom retention labels
This commit is contained in:
Ildar Kamalov
2023-10-16 10:06:37 +03:00
parent 506d71310c
commit 733d6c1fca
7 changed files with 46 additions and 21 deletions

View File

@@ -1,6 +1,11 @@
import { handleActions } from 'redux-actions';
import { normalizeTopClients } from '../helpers/helpers';
import { DAY, HOUR, STATS_INTERVALS_DAYS } from '../helpers/constants';
import {
DAY,
HOUR,
STATS_INTERVALS_DAYS,
TIME_UNITS,
} from '../helpers/constants';
import * as actions from '../actions/stats';
@@ -18,6 +23,7 @@ const defaultStats = {
numReplacedSafebrowsing: 0,
numReplacedSafesearch: 0,
avgProcessingTime: 0,
timeUnits: TIME_UNITS.HOURS,
};
const stats = handleActions(
@@ -60,6 +66,7 @@ const stats = handleActions(
avg_processing_time: avgProcessingTime,
top_upstreams_responses: topUpstreamsResponses,
top_upstrems_avg_time: topUpstreamsAvgTime,
time_units: timeUnits,
} = payload;
const newState = {
@@ -81,6 +88,7 @@ const stats = handleActions(
avgProcessingTime,
topUpstreamsResponses,
topUpstreamsAvgTime,
timeUnits,
};
return newState;