From 2407086b59e856fca6d24695d8e1fb8f668fa606 Mon Sep 17 00:00:00 2001 From: Eugene Lee Date: Wed, 9 Mar 2022 21:53:37 -0800 Subject: [PATCH] Update time to saved visualizations time when redirect to edit view (#570) Signed-off-by: Eugene Lee --- .../public/components/explorer/explorer.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dashboards-observability/public/components/explorer/explorer.tsx b/dashboards-observability/public/components/explorer/explorer.tsx index b4cb65e36..957c22415 100644 --- a/dashboards-observability/public/components/explorer/explorer.tsx +++ b/dashboards-observability/public/components/explorer/explorer.tsx @@ -227,6 +227,13 @@ export const Explorer = ({ const currQuery = appLogEvents ? objectData?.query.replace(appBaseQuery + '| ', '') : objectData?.query || ''; + + if (appLogEvents) { + if (objectData?.selected_date_range?.start && objectData?.selected_date_range?.end) { + setStartTime(objectData.selected_date_range.start); + setEndTime(objectData.selected_date_range.end); + } + } // update redux batch(async () => {