Skip to content

Commit

Permalink
chore: default event log span 1 year (#8995)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Dec 18, 2024
1 parent cac47fc commit 0c1f4cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/component/events/EventLog/useEventLogSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import mapValues from 'lodash.mapvalues';
import { useEventSearch } from 'hooks/api/getters/useEventSearch/useEventSearch';
import type { SearchEventsParams } from 'openapi';
import type { FilterItemParamHolder } from 'component/filter/Filters/Filters';
import { format, subMonths } from 'date-fns';
import { format, subYears } from 'date-fns';

type Log =
| { type: 'global' }
Expand Down Expand Up @@ -62,7 +62,7 @@ export const useEventLogSearch = (
limit: withDefault(NumberParam, DEFAULT_PAGE_SIZE),
query: StringParam,
from: withDefault(FilterItemParam, {
values: [format(subMonths(new Date(), 1), 'yyyy-MM-dd')],
values: [format(subYears(new Date(), 1), 'yyyy-MM-dd')],
operator: 'IS',
}),
to: withDefault(FilterItemParam, {
Expand Down

0 comments on commit 0c1f4cd

Please sign in to comment.