mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
fix: revert chart extension date intervals
This commit is contained in:
1 parent
2e51b20555
commit
478f79dfa3
1 file changed
+3
-3
@@ -174,12 +174,12 @@ export const calcChartStart = (params: Partial<LogsEndpointParams>): [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
|
||||
|
||||
Reference in new issue
Block a user