From 7f906bd0c1bddba64e23fdcdfeb61304542fa9c8 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Thu, 22 Jun 2023 10:36:41 +0200 Subject: [PATCH] [AO] Fix issue with alert summary widget refresh on the Alerts page (#160159) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #157245 ## Summary This PR updates the absolute time range when the refresh button is clicked. ## 🧪 How to test - On the Alerts page, click on refresh and check the time range of `_alert_summary` API call, it should be updated with each refresh ![image](https://github.com/elastic/kibana/assets/12370520/0522d770-6cf5-4af7-8c42-bb508e614164) --- x-pack/plugins/observability/public/pages/alerts/alerts.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability/public/pages/alerts/alerts.tsx b/x-pack/plugins/observability/public/pages/alerts/alerts.tsx index 85c4e10101fcd..578156ee044c4 100644 --- a/x-pack/plugins/observability/public/pages/alerts/alerts.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/alerts.tsx @@ -106,7 +106,8 @@ function InternalAlertsPage() { bucketSize?.intervalString || DEFAULT_INTERVAL, bucketSize?.dateFormat || DEFAULT_DATE_FORMAT ), - [alertSearchBarStateProps.rangeFrom, alertSearchBarStateProps.rangeTo, bucketSize] + // eslint-disable-next-line react-hooks/exhaustive-deps + [alertSearchBarStateProps.rangeFrom, alertSearchBarStateProps.rangeTo, bucketSize, esQuery] ); useBreadcrumbs([