Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
kqualters-elastic committed Nov 15, 2022
1 parent 28f00d6 commit 386ac1b
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,17 +360,22 @@ export const useTimelineEventsHandler = ({
...deStructureEqlOptions(prevEqlRequest),
};

const requestTimeRange =
startDate && endDate
? {
interval: '12h',
from: startDate,
to: endDate,
}
: {};

const currentSearchParameters = {
defaultIndex: indexNames,
filterQuery: createFilter(filterQuery),
querySize: limit,
sort,
timerange: {
interval: '12h',
from: startDate,
to: endDate,
},
runtimeMappings,
...(requestTimeRange ? requestTimeRange : {}),
...deStructureEqlOptions(eqlOptions),
};

Expand All @@ -391,11 +396,7 @@ export const useTimelineEventsHandler = ({
language,
runtimeMappings,
sort,
timerange: {
interval: '12h',
from: startDate,
to: endDate,
},
...(requestTimeRange ? requestTimeRange : {}),
...(eqlOptions ? eqlOptions : {}),
};

Expand Down

0 comments on commit 386ac1b

Please sign in to comment.