From b69e07378a29279d63e7792946916b13bb73b0ad Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Tue, 28 Jan 2020 16:07:31 +0100 Subject: [PATCH] [ML] Single Metric Viewer: Fix annnotations refresh. (#56107) When creating/editing/deleting an annotation, the Single Metric Viewer page wouldn't update with the applied changes. This fixes it by tracking the change in the outer component with lastRefresh/previousRefresh and making it a condition in contextChartSelected() to trigger an update after a refresh. --- .../application/routing/routes/timeseriesexplorer.tsx | 2 ++ .../timeseriesexplorer/timeseriesexplorer.js | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/x-pack/legacy/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx b/x-pack/legacy/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx index bc457f1a3fe89e..4455e6e99ada7e 100644 --- a/x-pack/legacy/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx +++ b/x-pack/legacy/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx @@ -89,6 +89,7 @@ export const TimeSeriesExplorerUrlStateManager: FC(); const refresh = useRefresh(); @@ -295,6 +296,7 @@ export const TimeSeriesExplorerUrlStateManager: FC