-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Alert details page] Use related alerts logic only for the custom threshold rule #193957
[Alert details page] Use related alerts logic only for the custom threshold rule #193957
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one question
useEffect(() => { | ||
setRelatedAlertsKuery(getRelatedAlertKuery(tags, groups)); | ||
}, [groups, setRelatedAlertsKuery, tags]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to check for empty groups or tags array? Or that's not possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be handled in getRelatedAlertKuery:
getRelatedAlertKuery = (tags?: string[], groups?: Group[])
…eshold rule (elastic#193957) Closes elastic#193943 ### Summary This PR only loads related alerts for the custom threshold rule and only when the related rule has tags or group by fields. For now, we don't show this tab if there is no tag or group and there is a follow-up ticket for discussing the empty state for the related alerts. #### Follow-up work - elastic#193952 - elastic#193942 (cherry picked from commit 387afb7)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…om threshold rule (#193957) (#193991) # Backport This will backport the following commits from `main` to `8.x`: - [[Alert details page] Use related alerts logic only for the custom threshold rule (#193957)](#193957) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-25T12:43:52Z","message":"[Alert details page] Use related alerts logic only for the custom threshold rule (#193957)\n\nCloses #193943\r\n\r\n### Summary\r\n\r\nThis PR only loads related alerts for the custom threshold rule and only\r\nwhen the related rule has tags or group by fields.\r\n\r\nFor now, we don't show this tab if there is no tag or group and there is\r\na follow-up ticket for discussing the empty state for the related\r\nalerts.\r\n\r\n#### Follow-up work\r\n- https://github.com/elastic/kibana/issues/193952\r\n- https://github.com/elastic/kibana/issues/193942","sha":"387afb782e44a0bf7de5549751e52fc7619c328a","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management"],"title":"[Alert details page] Use related alerts logic only for the custom threshold rule","number":193957,"url":"https://github.com/elastic/kibana/pull/193957","mergeCommit":{"message":"[Alert details page] Use related alerts logic only for the custom threshold rule (#193957)\n\nCloses #193943\r\n\r\n### Summary\r\n\r\nThis PR only loads related alerts for the custom threshold rule and only\r\nwhen the related rule has tags or group by fields.\r\n\r\nFor now, we don't show this tab if there is no tag or group and there is\r\na follow-up ticket for discussing the empty state for the related\r\nalerts.\r\n\r\n#### Follow-up work\r\n- https://github.com/elastic/kibana/issues/193952\r\n- https://github.com/elastic/kibana/issues/193942","sha":"387afb782e44a0bf7de5549751e52fc7619c328a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193957","number":193957,"mergeCommit":{"message":"[Alert details page] Use related alerts logic only for the custom threshold rule (#193957)\n\nCloses #193943\r\n\r\n### Summary\r\n\r\nThis PR only loads related alerts for the custom threshold rule and only\r\nwhen the related rule has tags or group by fields.\r\n\r\nFor now, we don't show this tab if there is no tag or group and there is\r\na follow-up ticket for discussing the empty state for the related\r\nalerts.\r\n\r\n#### Follow-up work\r\n- https://github.com/elastic/kibana/issues/193952\r\n- https://github.com/elastic/kibana/issues/193942","sha":"387afb782e44a0bf7de5549751e52fc7619c328a"}}]}] BACKPORT--> Co-authored-by: Maryam Saeidi <[email protected]>
Closes #193943
Summary
This PR only loads related alerts for the custom threshold rule and only when the related rule has tags or group by fields.
For now, we don't show this tab if there is no tag or group and there is a follow-up ticket for discussing the empty state for the related alerts.
Follow-up work