From 478f79dfa3004fd41f9f53802baef2c1297a8d88 Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Thu, 15 Sep 2022 04:16:42 +0800 Subject: [PATCH] fix: revert chart extension date intervals --- studio/components/interfaces/Settings/Logs/Logs.utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/studio/components/interfaces/Settings/Logs/Logs.utils.ts b/studio/components/interfaces/Settings/Logs/Logs.utils.ts index e008c1829f5..3351860f568 100644 --- a/studio/components/interfaces/Settings/Logs/Logs.utils.ts +++ b/studio/components/interfaces/Settings/Logs/Logs.utils.ts @@ -174,12 +174,12 @@ export const calcChartStart = (params: Partial): [Dayjs, str const ite = params.iso_timestamp_end ? dayjs(params.iso_timestamp_end) : dayjs() const its = params.iso_timestamp_start ? dayjs(params.iso_timestamp_start) : dayjs() let trunc = 'minute' - let extendValue = 60 * 1 + let extendValue = 60 * 6 const minuteDiff = ite.diff(its, 'minute') const hourDiff = ite.diff(its, 'hour') - if (minuteDiff > (60 * 8)) { + if (minuteDiff > (60 * 12)) { trunc = 'hour' - extendValue = 24 * 3 + extendValue = 24 * 5 } else if (hourDiff > 24 * 3) { trunc = 'day' extendValue = 7