From a2e83b7e18c5e37616c1bca618f534b25e8444a0 Mon Sep 17 00:00:00 2001 From: Eric Wei Date: Thu, 4 May 2023 15:13:44 -0700 Subject: [PATCH] fix timestamp overriding issue (#449) Signed-off-by: Eric Wei (cherry picked from commit ffa18c4cbe9c9c8ebff5cded0912fa572a07076b) --- public/components/event_analytics/explorer/explorer.tsx | 2 +- public/services/data_fetchers/ppl/ppl_data_fetcher.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/components/event_analytics/explorer/explorer.tsx b/public/components/event_analytics/explorer/explorer.tsx index 32423d6ffe..e75652f600 100644 --- a/public/components/event_analytics/explorer/explorer.tsx +++ b/public/components/event_analytics/explorer/explorer.tsx @@ -284,7 +284,7 @@ export const Explorer = ({ }, { appBaseQuery, - query: rawQueryStr, + query: curQuery, startingTime, endingTime, isLiveTailOn: isLiveTailOnRef.current, diff --git a/public/services/data_fetchers/ppl/ppl_data_fetcher.ts b/public/services/data_fetchers/ppl/ppl_data_fetcher.ts index e83b45dc78..e621910c5d 100644 --- a/public/services/data_fetchers/ppl/ppl_data_fetcher.ts +++ b/public/services/data_fetchers/ppl/ppl_data_fetcher.ts @@ -32,7 +32,7 @@ export class PPLDataFetcher extends DataFetcherBase implements IDataFetcher { ) { super(); // index/index patterns for this search - this.queryIndex = this.getIndex(this.searchParams.query); + this.queryIndex = this.getIndex(this.searchParams.query.rawQuery); } async setTimestamp(index: string) { @@ -186,7 +186,7 @@ export class PPLDataFetcher extends DataFetcherBase implements IDataFetcher { tabId, query: { finalQuery, - [RAW_QUERY]: query, + [RAW_QUERY]: query.rawQuery, [SELECTED_TIMESTAMP]: curTimestamp, }, })