Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions public/components/common/search/query_area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useFetchEvents } from '../../event_analytics/hooks/use_fetch_events';
export function QueryArea({
tabId,
handleQueryChange,
handleTimePickerChange,
handleTimeRangePickerRefresh,
runQuery,
tempQuery,
Expand Down Expand Up @@ -66,6 +67,7 @@ export function QueryArea({
<EuiFlexItem>
<QueryAssistInput
tabId={tabId}
handleTimePickerChange={handleTimePickerChange}
handleQueryChange={handleQueryChange}
handleTimeRangePickerRefresh={handleTimeRangePickerRefresh}
setNeedsUpdate={setNeedsUpdate}
Expand Down
1 change: 1 addition & 0 deletions public/components/common/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ export const Search = (props: any) => {
<QueryArea
tabId={tabId}
handleQueryChange={handleQueryChange}
handleTimePickerChange={handleTimePickerChange}
handleTimeRangePickerRefresh={handleTimeRangePickerRefresh}
runQuery={query}
tempQuery={tempQuery}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { RAW_QUERY } from '../../../../../common/constants/explorer';
import { QUERY_ASSIST_API } from '../../../../../common/constants/query_assist';
import { QUERY_ASSIST_START_TIME } from '../../../../../common/constants/shared';
import { getOSDHttp } from '../../../../../common/utils';
import { coreRefs } from '../../../../framework/core_refs';
import chatLogo from '../../../datasources/icons/query-assistant-logo.svg';
Expand All @@ -47,6 +48,7 @@ interface SummarizationContext {
interface Props {
handleQueryChange: (query: string) => void;
handleTimeRangePickerRefresh: (availability?: boolean, setSummaryStatus?: boolean) => void;
handleTimePickerChange: (timeRange: string[]) => Promise<void>;
tabId: string;
setNeedsUpdate: any;
selectedIndex: Array<EuiComboBoxOptionOption<string | number | string[] | undefined>>;
Expand Down Expand Up @@ -246,6 +248,7 @@ export const QueryAssistInput: React.FC<Props> = (props) => {
try {
setGeneratingOrRunning(true);
await request();
await props.handleTimePickerChange([QUERY_ASSIST_START_TIME, 'now']);
await props.handleTimeRangePickerRefresh(undefined, true);
} catch (error) {
generateSummary({ isError: true, response: JSON.stringify((error as ResponseError).body) });
Expand Down