[Alert details page] Use related alerts logic only for the custom threshold rule#193957
Merged
maryam-saeidi merged 7 commits intoelastic:mainfrom Sep 25, 2024
Merged
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Contributor
|
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: |
kdelemme
approved these changes
Sep 25, 2024
Contributor
kdelemme
left a comment
There was a problem hiding this comment.
LGTM, just one question
Comment on lines
+118
to
+120
| useEffect(() => { | ||
| setRelatedAlertsKuery(getRelatedAlertKuery(tags, groups)); | ||
| }, [groups, setRelatedAlertsKuery, tags]); |
Contributor
There was a problem hiding this comment.
Do we need to check for empty groups or tags array? Or that's not possible?
Member
Author
There was a problem hiding this comment.
This will be handled in getRelatedAlertKuery:
getRelatedAlertKuery = (tags?: string[], groups?: Group[])
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Sep 25, 2024
…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)
Contributor
💚 All backports created successfully
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
Sep 25, 2024
…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":"maryam.saeidi@elastic.co"},"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 <maryam.saeidi@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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