Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

maryam-saeidi
Copy link
Member

@maryam-saeidi maryam-saeidi commented Jun 21, 2023

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

@maryam-saeidi maryam-saeidi added release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" labels Jun 21, 2023
@maryam-saeidi maryam-saeidi self-assigned this Jun 21, 2023
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@maryam-saeidi maryam-saeidi marked this pull request as ready for review June 21, 2023 15:29
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner June 21, 2023 15:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: if you take in esQuery into the getAlertSummaryTimeRange function, ESLint won't complain about the unnecessary dependency

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by moving esQuery into the getAlertSummaryTimeRange function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will merge my PR, but if you share with me details of your suggestion, I can cover it in my future PRs

Copy link
Contributor

@CoenWarmer CoenWarmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion added, but looks fine

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 1.0MB 1.0MB +2.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 13 15 +2
observability 40 41 +1
securitySolution 416 420 +4
total +7

Total ESLint disabled count

id before after diff
enterpriseSearch 14 16 +2
observability 45 46 +1
securitySolution 497 501 +4
total +7

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @maryam-saeidi

@maryam-saeidi maryam-saeidi added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Jun 22, 2023
@maryam-saeidi maryam-saeidi merged commit 7f906bd into elastic:main Jun 22, 2023
@maryam-saeidi maryam-saeidi deleted the fix-alert-summary-refresh branch June 22, 2023 08:36
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 22, 2023
…lastic#160159)

Fixes elastic#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)

(cherry picked from commit 7f906bd)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jun 22, 2023
…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)](#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](https://github.com/elastic/kibana/assets/12370520/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](https://github.com/elastic/kibana/assets/12370520/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](https://github.com/elastic/kibana/assets/12370520/0522d770-6cf5-4af7-8c42-bb508e614164)","sha":"7f906bd0c1bddba64e23fdcdfeb61304542fa9c8"}}]}]
BACKPORT-->

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.8.2 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AO] Alerts page: refresh does not work properly on the alert summary widget
6 participants