mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Query relative times around now for preview table (#138067)
This commit is contained in:
parent
604a18d0c6
commit
e0b4b1baa3
1 changed files with 6 additions and 3 deletions
|
@ -91,7 +91,6 @@ export const PreviewHistogram = ({
|
|||
() => (advancedOptions ? advancedOptions.timeframeEnd.toISOString() : formatDate(to)),
|
||||
[to, advancedOptions]
|
||||
);
|
||||
const alertsEndDate = useMemo(() => formatDate(to), [to]);
|
||||
const isEqlRule = useMemo(() => ruleType === 'eql', [ruleType]);
|
||||
const isMlRule = useMemo(() => ruleType === 'machine_learning', [ruleType]);
|
||||
|
||||
|
@ -214,7 +213,12 @@ export const PreviewHistogram = ({
|
|||
dataProviders,
|
||||
deletedEventIds,
|
||||
disabledCellActions: FIELDS_WITHOUT_CELL_ACTIONS,
|
||||
end: alertsEndDate,
|
||||
// Fix for https://github.com/elastic/kibana/issues/135511, until we start writing proper
|
||||
// simulated @timestamp values to the preview alerts. The preview alerts will have @timestamp values
|
||||
// close to the server's `now` time, but the client clock could be out of sync with the server. So we
|
||||
// avoid computing static dates for this time range filter and instead pass in a small relative time window.
|
||||
end: 'now+5m',
|
||||
start: 'now-5m',
|
||||
entityType: 'events',
|
||||
filters: [],
|
||||
globalFullScreen,
|
||||
|
@ -233,7 +237,6 @@ export const PreviewHistogram = ({
|
|||
runtimeMappings,
|
||||
setQuery: () => {},
|
||||
sort,
|
||||
start: startDate,
|
||||
tGridEventRenderedViewEnabled,
|
||||
type: 'embedded',
|
||||
leadingControlColumns: getPreviewTableControlColumn(1.5),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue