[8.19] [ResponseOps][Alerts] Embeddable alerts table creation flow (#216076)#220796
Closed
kibanamachine wants to merge 2 commits intoelastic:8.19from
Closed
[8.19] [ResponseOps][Alerts] Embeddable alerts table creation flow (#216076)#220796kibanamachine wants to merge 2 commits intoelastic:8.19from
kibanamachine wants to merge 2 commits intoelastic:8.19from
Conversation
…216076) ## Summary - Implements the embeddable alerts table creation flow, with solution and filters. - Enables the new table panel creation action. <img width="1115" alt="image" src="https://github.com/user-attachments/assets/d3158e55-3d09-4e52-b718-0ebe3e911e4c" /> <img width="1488" alt="image" src="https://github.com/user-attachments/assets/c6e65f12-1347-4859-83f5-1de996d6ba86" /> <details> <summary> ## Implementation details </summary> ### Panel configuration state As part of the panel's persisted configuration state, I opted to only save the selected `solution` (`observability`, `security`, `stack`) and not the resulting list of rule type ids. Re-calculating the rule type ids based on the solution at render time ensures that users see the rule types they have access to, and should avoid potential authentication errors (both when editing the configuration and viewing the panel). ### Switching solution <img width="881" alt="image" src="https://github.com/user-attachments/assets/c4d0359f-dedb-4e74-a4c2-a49d81987fd5" /> When switching solution, the filters form must be reset since the rule type ids it is based on change. This can be disruptive for the UX, so I added a confirmation prompt in case the user already started to edit the form and then tries to change solution. ### Missing authorization <img width="1489" alt="image" src="https://github.com/user-attachments/assets/866db208-495c-4eec-8ec8-9c2be2d00680" /> When a user doesn't have the necessary permissions for the rule types a panel is based on, a missing authz prompt is shown. </details> ## Verification steps 1. Create rules that fire alerts in multiple solutions (Security, Observability and Stack) 2. Create a new dashboard or open an existing one, enter edit mode if not active 3. Click `+ Add panel > Alerts` 4. Check that the solution selector options are coherent with the rule types the user can access 5. Select a solution 6. Build filters expressions, checking that the rule tags and rule types are coherent with the solution selection and the rules created previously 7. Save the panel 8. Check that the created panel reflects the filtering options from the creation flyout 9. Repeat steps 3-9 with different roles: 9.1. having access to rule types from just one solution (in this case the solution selector shouldn't appear at all), 9.2. having access just to Observability and Stack but not Security (in this case the solution selector shouldn't appear at all), 10. Repeat steps 3-8 in the three serverless project types: ```shell $ yarn es serverless —ssl --projectType <es|oblt|security> $ yarn serverless-<es|oblt|security> --ssl --run-examples ``` (If the authentication fails when switching between project types, use a clean session) 10.1. Elasticsearch project types should have access only to Stack rules (no selector) 10.2. Observability project types should have access only to Observability and Stack rules (no selector) 10.3. Security project types should have access only to Security and Stack rules (selector shows Stack instead of Observability) 11. In the previous cases, when the user doesn't have access to rule types from the solution a certain panel is configured to show, check that an authorization prompt is shown 12. Using a role without access to any rule type 12.1. Check that the `Alerts` panel type is not visible in the `Add panel` flyout 12.2. Check that any pre-existing table panels show a missing authz prompt ## Release Notes Added an embeddable panel for Dashboards to display alerts. ## References Closes elastic#203613 Closes elastic#203614 Closes elastic#203612 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 0a7874c)
4 tasks
Contributor
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsasync chunk count
ESLint disabled in files
Total ESLint disabled count
History
cc @umbopepato |
Member
|
Checking flakyness in the functional test added by the original PR (flaky test runner ran successfully before merging) |
Member
|
Closing in favor of manual backport PR #221629 |
auto-merge was automatically disabled
May 27, 2025 14:49
Pull request was closed
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.
Backport
This will backport the following commits from
mainto8.19:Questions ?
Please refer to the Backport tool documentation