[8.8] [AO] Fix issue with alert summary widget refresh on the Alerts page (#160159) (#160233)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[AO] Fix issue with alert summary widget refresh on the Alerts page
(#160159)](https://github.com/elastic/kibana/pull/160159)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Maryam
Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2023-06-22T08:36:41Z","message":"[AO]
Fix issue with alert summary widget refresh on the Alerts page
(#160159)\n\nFixes #157245\r\n\r\n## Summary\r\n\r\nThis PR updates the
absolute time range when the refresh button is\r\nclicked.\r\n\r\n## 🧪
How to test\r\n- On the Alerts page, click on refresh and check the time
range of\r\n`_alert_summary` API call, it should be updated with each
refresh\r\n\r\n\r\n![image](0522d770-6cf5-4af7-8c42-bb508e614164)","sha":"7f906bd0c1bddba64e23fdcdfeb61304542fa9c8","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
Actionable
Observability","backport:prev-minor","v8.9.0"],"number":160159,"url":"https://github.com/elastic/kibana/pull/160159","mergeCommit":{"message":"[AO]
Fix issue with alert summary widget refresh on the Alerts page
(#160159)\n\nFixes #157245\r\n\r\n## Summary\r\n\r\nThis PR updates the
absolute time range when the refresh button is\r\nclicked.\r\n\r\n## 🧪
How to test\r\n- On the Alerts page, click on refresh and check the time
range of\r\n`_alert_summary` API call, it should be updated with each
refresh\r\n\r\n\r\n![image](0522d770-6cf5-4af7-8c42-bb508e614164)","sha":"7f906bd0c1bddba64e23fdcdfeb61304542fa9c8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160159","number":160159,"mergeCommit":{"message":"[AO]
Fix issue with alert summary widget refresh on the Alerts page
(#160159)\n\nFixes #157245\r\n\r\n## Summary\r\n\r\nThis PR updates the
absolute time range when the refresh button is\r\nclicked.\r\n\r\n## 🧪
How to test\r\n- On the Alerts page, click on refresh and check the time
range of\r\n`_alert_summary` API call, it should be updated with each
refresh\r\n\r\n\r\n![image](0522d770-6cf5-4af7-8c42-bb508e614164)","sha":"7f906bd0c1bddba64e23fdcdfeb61304542fa9c8"}}]}]
BACKPORT-->

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
This commit is contained in:
Kibana Machine 2023-06-22 05:47:06 -04:00 committed by GitHub
parent d0868c4165
commit db8521641e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,7 +107,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([