[ResponseOps][Alerts] Add alerts table to a dashboard#216076
[ResponseOps][Alerts] Add alerts table to a dashboard#216076umbopepato merged 58 commits intoelastic:mainfrom
Conversation
|
/ci |
05ed2cd to
2f46bb2
Compare
|
/ci |
1 similar comment
|
/ci |
e4354e4 to
2994e83
Compare
|
/ci |
d0b2a78 to
3c86680
Compare
|
/ci |
1 similar comment
|
/ci |
87ddfd6 to
7f50576
Compare
|
/ci |
7f50576 to
a9a42d7
Compare
|
/ci |
…le-alerts-table-creation-flow
a9a42d7 to
1dfb967
Compare
|
/ci |
|
@joana-cps I remembered that the Feature column is currently being used for some assertions in functional tests, so I haven't had time to remove it now, but it's the first thing on the list! |
…le-alerts-table-creation-flow
….com:umbopepato/kibana into 203614-embeddable-alerts-table-creation-flow
|
Starting backport for target branches: 8.19 |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsasync chunk count
ESLint disabled in files
Total ESLint disabled count
History
|
…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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
6 similar comments
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…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)
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
…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>
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
…216076) (#221629) # Backport This will backport the following commits from `main` to `8.19`: - [[ResponseOps][Alerts] Embeddable alerts table creation flow (#216076)](#216076) <!--- Backport version: 10.0.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Umberto Pepato","email":"umbopepato@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-05-14T15:46:27Z","message":"[ResponseOps][Alerts] Embeddable alerts table creation flow (#216076)\n\n## Summary\n\n- Implements the embeddable alerts table creation flow, with solution\nand filters.\n- Enables the new table panel creation action.\n\n<img width=\"1115\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d3158e55-3d09-4e52-b718-0ebe3e911e4c\"\n/>\n\n<img width=\"1488\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c6e65f12-1347-4859-83f5-1de996d6ba86\"\n/>\n\n<details>\n<summary>\n\n## Implementation details\n\n</summary>\n\n### Panel configuration state\n\nAs part of the panel's persisted configuration state, I opted to only\nsave the selected `solution` (`observability`, `security`, `stack`) and\nnot the resulting list of rule type ids. Re-calculating the rule type\nids based on the solution at render time ensures that users see the rule\ntypes they have access to, and should avoid potential authentication\nerrors (both when editing the configuration and viewing the panel).\n\n### Switching solution\n\n<img width=\"881\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c4d0359f-dedb-4e74-a4c2-a49d81987fd5\"\n/>\n\nWhen switching solution, the filters form must be reset since the rule\ntype ids it is based on change. This can be disruptive for the UX, so I\nadded a confirmation prompt in case the user already started to edit the\nform and then tries to change solution.\n\n### Missing authorization\n\n<img width=\"1489\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/866db208-495c-4eec-8ec8-9c2be2d00680\"\n/>\n\nWhen a user doesn't have the necessary permissions for the rule types a\npanel is based on, a missing authz prompt is shown.\n\n</details>\n\n## Verification steps\n\n1. Create rules that fire alerts in multiple solutions (Security,\nObservability and Stack)\n2. Create a new dashboard or open an existing one, enter edit mode if\nnot active\n3. Click `+ Add panel > Alerts`\n4. Check that the solution selector options are coherent with the rule\ntypes the user can access\n5. Select a solution\n6. Build filters expressions, checking that the rule tags and rule types\nare coherent with the solution selection and the rules created\npreviously\n7. Save the panel\n8. Check that the created panel reflects the filtering options from the\ncreation flyout\n9. Repeat steps 3-9 with different roles:\n9.1. having access to rule types from just one solution (in this case\nthe solution selector shouldn't appear at all),\n9.2. having access just to Observability and Stack but not Security (in\nthis case the solution selector shouldn't appear at all),\n10. Repeat steps 3-8 in the three serverless project types:\n ```shell\n $ yarn es serverless —ssl --projectType <es|oblt|security>\n $ yarn serverless-<es|oblt|security> --ssl --run-examples\n ```\n(If the authentication fails when switching between project types, use a\nclean session)\n10.1. Elasticsearch project types should have access only to Stack rules\n(no selector)\n10.2. Observability project types should have access only to\nObservability and Stack rules (no selector)\n10.3. Security project types should have access only to Security and\nStack rules (selector shows Stack instead of Observability)\n11. In the previous cases, when the user doesn't have access to rule\ntypes from the solution a certain panel is configured to show, check\nthat an authorization prompt is shown\n12. Using a role without access to any rule type\n12.1. Check that the `Alerts` panel type is not visible in the `Add\npanel` flyout\n12.2. Check that any pre-existing table panels show a missing authz\nprompt\n\n## Release Notes\n\nAdded an embeddable panel for Dashboards to display alerts.\n\n## References\n\nCloses #203613\nCloses #203614\nCloses #203612\n\n### Checklist\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0a7874cecead785d1d8c4db2ea9bd4fa4c287622","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:ResponseOps","backport missing","release_note:feature","backport:version","v9.1.0","v8.19.0"],"title":"[ResponseOps][Alerts] Embeddable alerts table creation flow","number":216076,"url":"https://github.com/elastic/kibana/pull/216076","mergeCommit":{"message":"[ResponseOps][Alerts] Embeddable alerts table creation flow (#216076)\n\n## Summary\n\n- Implements the embeddable alerts table creation flow, with solution\nand filters.\n- Enables the new table panel creation action.\n\n<img width=\"1115\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d3158e55-3d09-4e52-b718-0ebe3e911e4c\"\n/>\n\n<img width=\"1488\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c6e65f12-1347-4859-83f5-1de996d6ba86\"\n/>\n\n<details>\n<summary>\n\n## Implementation details\n\n</summary>\n\n### Panel configuration state\n\nAs part of the panel's persisted configuration state, I opted to only\nsave the selected `solution` (`observability`, `security`, `stack`) and\nnot the resulting list of rule type ids. Re-calculating the rule type\nids based on the solution at render time ensures that users see the rule\ntypes they have access to, and should avoid potential authentication\nerrors (both when editing the configuration and viewing the panel).\n\n### Switching solution\n\n<img width=\"881\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c4d0359f-dedb-4e74-a4c2-a49d81987fd5\"\n/>\n\nWhen switching solution, the filters form must be reset since the rule\ntype ids it is based on change. This can be disruptive for the UX, so I\nadded a confirmation prompt in case the user already started to edit the\nform and then tries to change solution.\n\n### Missing authorization\n\n<img width=\"1489\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/866db208-495c-4eec-8ec8-9c2be2d00680\"\n/>\n\nWhen a user doesn't have the necessary permissions for the rule types a\npanel is based on, a missing authz prompt is shown.\n\n</details>\n\n## Verification steps\n\n1. Create rules that fire alerts in multiple solutions (Security,\nObservability and Stack)\n2. Create a new dashboard or open an existing one, enter edit mode if\nnot active\n3. Click `+ Add panel > Alerts`\n4. Check that the solution selector options are coherent with the rule\ntypes the user can access\n5. Select a solution\n6. Build filters expressions, checking that the rule tags and rule types\nare coherent with the solution selection and the rules created\npreviously\n7. Save the panel\n8. Check that the created panel reflects the filtering options from the\ncreation flyout\n9. Repeat steps 3-9 with different roles:\n9.1. having access to rule types from just one solution (in this case\nthe solution selector shouldn't appear at all),\n9.2. having access just to Observability and Stack but not Security (in\nthis case the solution selector shouldn't appear at all),\n10. Repeat steps 3-8 in the three serverless project types:\n ```shell\n $ yarn es serverless —ssl --projectType <es|oblt|security>\n $ yarn serverless-<es|oblt|security> --ssl --run-examples\n ```\n(If the authentication fails when switching between project types, use a\nclean session)\n10.1. Elasticsearch project types should have access only to Stack rules\n(no selector)\n10.2. Observability project types should have access only to\nObservability and Stack rules (no selector)\n10.3. Security project types should have access only to Security and\nStack rules (selector shows Stack instead of Observability)\n11. In the previous cases, when the user doesn't have access to rule\ntypes from the solution a certain panel is configured to show, check\nthat an authorization prompt is shown\n12. Using a role without access to any rule type\n12.1. Check that the `Alerts` panel type is not visible in the `Add\npanel` flyout\n12.2. Check that any pre-existing table panels show a missing authz\nprompt\n\n## Release Notes\n\nAdded an embeddable panel for Dashboards to display alerts.\n\n## References\n\nCloses #203613\nCloses #203614\nCloses #203612\n\n### Checklist\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0a7874cecead785d1d8c4db2ea9bd4fa4c287622"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216076","number":216076,"mergeCommit":{"message":"[ResponseOps][Alerts] Embeddable alerts table creation flow (#216076)\n\n## Summary\n\n- Implements the embeddable alerts table creation flow, with solution\nand filters.\n- Enables the new table panel creation action.\n\n<img width=\"1115\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d3158e55-3d09-4e52-b718-0ebe3e911e4c\"\n/>\n\n<img width=\"1488\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c6e65f12-1347-4859-83f5-1de996d6ba86\"\n/>\n\n<details>\n<summary>\n\n## Implementation details\n\n</summary>\n\n### Panel configuration state\n\nAs part of the panel's persisted configuration state, I opted to only\nsave the selected `solution` (`observability`, `security`, `stack`) and\nnot the resulting list of rule type ids. Re-calculating the rule type\nids based on the solution at render time ensures that users see the rule\ntypes they have access to, and should avoid potential authentication\nerrors (both when editing the configuration and viewing the panel).\n\n### Switching solution\n\n<img width=\"881\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c4d0359f-dedb-4e74-a4c2-a49d81987fd5\"\n/>\n\nWhen switching solution, the filters form must be reset since the rule\ntype ids it is based on change. This can be disruptive for the UX, so I\nadded a confirmation prompt in case the user already started to edit the\nform and then tries to change solution.\n\n### Missing authorization\n\n<img width=\"1489\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/866db208-495c-4eec-8ec8-9c2be2d00680\"\n/>\n\nWhen a user doesn't have the necessary permissions for the rule types a\npanel is based on, a missing authz prompt is shown.\n\n</details>\n\n## Verification steps\n\n1. Create rules that fire alerts in multiple solutions (Security,\nObservability and Stack)\n2. Create a new dashboard or open an existing one, enter edit mode if\nnot active\n3. Click `+ Add panel > Alerts`\n4. Check that the solution selector options are coherent with the rule\ntypes the user can access\n5. Select a solution\n6. Build filters expressions, checking that the rule tags and rule types\nare coherent with the solution selection and the rules created\npreviously\n7. Save the panel\n8. Check that the created panel reflects the filtering options from the\ncreation flyout\n9. Repeat steps 3-9 with different roles:\n9.1. having access to rule types from just one solution (in this case\nthe solution selector shouldn't appear at all),\n9.2. having access just to Observability and Stack but not Security (in\nthis case the solution selector shouldn't appear at all),\n10. Repeat steps 3-8 in the three serverless project types:\n ```shell\n $ yarn es serverless —ssl --projectType <es|oblt|security>\n $ yarn serverless-<es|oblt|security> --ssl --run-examples\n ```\n(If the authentication fails when switching between project types, use a\nclean session)\n10.1. Elasticsearch project types should have access only to Stack rules\n(no selector)\n10.2. Observability project types should have access only to\nObservability and Stack rules (no selector)\n10.3. Security project types should have access only to Security and\nStack rules (selector shows Stack instead of Observability)\n11. In the previous cases, when the user doesn't have access to rule\ntypes from the solution a certain panel is configured to show, check\nthat an authorization prompt is shown\n12. Using a role without access to any rule type\n12.1. Check that the `Alerts` panel type is not visible in the `Add\npanel` flyout\n12.2. Check that any pre-existing table panels show a missing authz\nprompt\n\n## Release Notes\n\nAdded an embeddable panel for Dashboards to display alerts.\n\n## References\n\nCloses #203613\nCloses #203614\nCloses #203612\n\n### Checklist\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0a7874cecead785d1d8c4db2ea9bd4fa4c287622"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/220796","number":220796,"state":"OPEN"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…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>
Summary
Implementation details
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
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
When a user doesn't have the necessary permissions for the rule types a panel is based on, a missing authz prompt is shown.
Verification steps
+ Add panel > Alerts9.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.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)
12.1. Check that the
Alertspanel type is not visible in theAdd panelflyout12.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 #203613
Closes #203614
Closes #203612
Checklist
release_note:*label is applied per the guidelines