mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
chore: default event log span 1 year (#8995)
This commit is contained in:
parent
cac47fc8f2
commit
0c1f4cdcef
@ -10,7 +10,7 @@ import mapValues from 'lodash.mapvalues';
|
|||||||
import { useEventSearch } from 'hooks/api/getters/useEventSearch/useEventSearch';
|
import { useEventSearch } from 'hooks/api/getters/useEventSearch/useEventSearch';
|
||||||
import type { SearchEventsParams } from 'openapi';
|
import type { SearchEventsParams } from 'openapi';
|
||||||
import type { FilterItemParamHolder } from 'component/filter/Filters/Filters';
|
import type { FilterItemParamHolder } from 'component/filter/Filters/Filters';
|
||||||
import { format, subMonths } from 'date-fns';
|
import { format, subYears } from 'date-fns';
|
||||||
|
|
||||||
type Log =
|
type Log =
|
||||||
| { type: 'global' }
|
| { type: 'global' }
|
||||||
@ -62,7 +62,7 @@ export const useEventLogSearch = (
|
|||||||
limit: withDefault(NumberParam, DEFAULT_PAGE_SIZE),
|
limit: withDefault(NumberParam, DEFAULT_PAGE_SIZE),
|
||||||
query: StringParam,
|
query: StringParam,
|
||||||
from: withDefault(FilterItemParam, {
|
from: withDefault(FilterItemParam, {
|
||||||
values: [format(subMonths(new Date(), 1), 'yyyy-MM-dd')],
|
values: [format(subYears(new Date(), 1), 'yyyy-MM-dd')],
|
||||||
operator: 'IS',
|
operator: 'IS',
|
||||||
}),
|
}),
|
||||||
to: withDefault(FilterItemParam, {
|
to: withDefault(FilterItemParam, {
|
||||||
|
Loading…
Reference in New Issue
Block a user