[Security Solution][Alert flyout] Edit highlighted fields in overview tab#216740
[Security Solution][Alert flyout] Edit highlighted fields in overview tab#216740PhilippeOberti merged 3 commits intoelastic:mainfrom
Conversation
edad531 to
c3cff3f
Compare
|
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
...curity_solution/public/flyout/document_details/right/components/highlighted_fields_modal.tsx
Outdated
Show resolved
Hide resolved
PhilippeOberti
left a comment
There was a problem hiding this comment.
Desk tested and it look amazing! I left a few comments in the code, happy to discuss if some don't make sense!
...urity_solution/public/flyout/document_details/right/components/highlighted_fields_button.tsx
Outdated
Show resolved
Hide resolved
.../plugins/security_solution/public/common/components/event_details/get_alert_summary_rows.tsx
Show resolved
Hide resolved
...ins/security_solution/public/flyout/document_details/right/components/highlighted_fields.tsx
Outdated
Show resolved
Hide resolved
...urity_solution/public/flyout/document_details/right/components/highlighted_fields_button.tsx
Show resolved
Hide resolved
...urity_solution/public/flyout/document_details/right/components/highlighted_fields_button.tsx
Outdated
Show resolved
Hide resolved
...ty_solution/public/flyout/document_details/shared/hooks/use_highlighted_fields_privilege.tsx
Outdated
Show resolved
Hide resolved
...curity_solution/public/flyout/document_details/right/components/highlighted_fields_modal.tsx
Show resolved
Hide resolved
...curity_solution/public/flyout/document_details/right/components/highlighted_fields_modal.tsx
Outdated
Show resolved
Hide resolved
...curity_solution/public/flyout/document_details/right/components/highlighted_fields_modal.tsx
Outdated
Show resolved
Hide resolved
...curity_solution/public/flyout/document_details/right/components/highlighted_fields_modal.tsx
Show resolved
Hide resolved
PhilippeOberti
left a comment
There was a problem hiding this comment.
Left one more comment/question I had missed in my first review, sorry!
...ins/security_solution/public/flyout/document_details/right/components/highlighted_fields.tsx
Outdated
Show resolved
Hide resolved
...urity_solution/public/flyout/document_details/right/components/highlighted_fields_button.tsx
Outdated
Show resolved
Hide resolved
...ty_solution/public/flyout/document_details/shared/hooks/use_highlighted_fields_privilege.tsx
Show resolved
Hide resolved
| export const useHighlightedFields = ({ | ||
| dataFormattedForFieldBrowser, | ||
| investigationFields, | ||
| type = 'all', |
There was a problem hiding this comment.
Yes sorry! I think it should be safe to remove the most level one, which is useHighlightedFields (and not getHighlightedFieldsToDisplay). Makes sense?
...curity_solution/public/flyout/document_details/right/components/highlighted_fields_modal.tsx
Outdated
Show resolved
Hide resolved
PhilippeOberti
left a comment
There was a problem hiding this comment.
Thank you for making all the changes, the functionality is awesome, users are going to love it! Great work on the UI, the code is super clean and thanks for adding plenty of unit tests as well!
💔 Build Failed
Failed CI StepsMetrics [docs]Module Count
Async chunks
Page load bundle
History
|
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/14475472732 |
… tab (elastic#216740) ## Summary This PR allows user to edit highlighted fields in alert flyout, under `Investigations`. The modal shows default highlighted fields that are defined by Elastic, and allow user to edit custom highlighted fields. Currently this feature is behind feature flag `editHighlightedFieldsEnabled` (not enabled by default). https://github.com/user-attachments/assets/35b3d09e-5e21-42ea-80e9-e8c0753985c9 #### Disabled when: <details> <summary>User does not have security privilege</summary>  </details> <details> <summary>Prebuilt rule w/o enterprise license (showing upsell)</summary>  </details> #### Do not show the button when: <details> <summary>Not an alert </summary>  </details> <details> <summary>rule preview</summary>  </details> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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) - [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) (cherry picked from commit a4a11bb)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…erview tab (#216740) (#218323) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution][Alert flyout] Edit highlighted fields in overview tab (#216740)](#216740) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"christineweng","email":"18648970+christineweng@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-15T17:18:35Z","message":"[Security Solution][Alert flyout] Edit highlighted fields in overview tab (#216740)\n\n## Summary\n\nThis PR allows user to edit highlighted fields in alert flyout, under\n`Investigations`. The modal shows default highlighted fields that are\ndefined by Elastic, and allow user to edit custom highlighted fields.\n\nCurrently this feature is behind feature flag\n`editHighlightedFieldsEnabled` (not enabled by default).\n\n\n\nhttps://github.com/user-attachments/assets/35b3d09e-5e21-42ea-80e9-e8c0753985c9\n\n\n\n#### Disabled when:\n\n<details>\n<summary>User does not have security privilege</summary>\n\n\n\n\n</details>\n\n<details>\n<summary>Prebuilt rule w/o enterprise license (showing upsell)</summary>\n\n\n\n\n</details>\n\n#### Do not show the button when:\n<details>\n<summary>Not an alert </summary>\n\n\n\n\n</details>\n\n<details>\n<summary>rule preview</summary>\n\n\n\n\n</details>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\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- [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)","sha":"a4a11bb46f63ad78399f152257a883d1a35f4ce9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:feature","Team:Threat Hunting:Investigations","backport:version","v9.1.0","v8.19.0"],"title":"[Security Solution][Alert flyout] Edit highlighted fields in overview tab","number":216740,"url":"https://github.com/elastic/kibana/pull/216740","mergeCommit":{"message":"[Security Solution][Alert flyout] Edit highlighted fields in overview tab (#216740)\n\n## Summary\n\nThis PR allows user to edit highlighted fields in alert flyout, under\n`Investigations`. The modal shows default highlighted fields that are\ndefined by Elastic, and allow user to edit custom highlighted fields.\n\nCurrently this feature is behind feature flag\n`editHighlightedFieldsEnabled` (not enabled by default).\n\n\n\nhttps://github.com/user-attachments/assets/35b3d09e-5e21-42ea-80e9-e8c0753985c9\n\n\n\n#### Disabled when:\n\n<details>\n<summary>User does not have security privilege</summary>\n\n\n\n\n</details>\n\n<details>\n<summary>Prebuilt rule w/o enterprise license (showing upsell)</summary>\n\n\n\n\n</details>\n\n#### Do not show the button when:\n<details>\n<summary>Not an alert </summary>\n\n\n\n\n</details>\n\n<details>\n<summary>rule preview</summary>\n\n\n\n\n</details>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\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- [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)","sha":"a4a11bb46f63ad78399f152257a883d1a35f4ce9"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216740","number":216740,"mergeCommit":{"message":"[Security Solution][Alert flyout] Edit highlighted fields in overview tab (#216740)\n\n## Summary\n\nThis PR allows user to edit highlighted fields in alert flyout, under\n`Investigations`. The modal shows default highlighted fields that are\ndefined by Elastic, and allow user to edit custom highlighted fields.\n\nCurrently this feature is behind feature flag\n`editHighlightedFieldsEnabled` (not enabled by default).\n\n\n\nhttps://github.com/user-attachments/assets/35b3d09e-5e21-42ea-80e9-e8c0753985c9\n\n\n\n#### Disabled when:\n\n<details>\n<summary>User does not have security privilege</summary>\n\n\n\n\n</details>\n\n<details>\n<summary>Prebuilt rule w/o enterprise license (showing upsell)</summary>\n\n\n\n\n</details>\n\n#### Do not show the button when:\n<details>\n<summary>Not an alert </summary>\n\n\n\n\n</details>\n\n<details>\n<summary>rule preview</summary>\n\n\n\n\n</details>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\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- [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)","sha":"a4a11bb46f63ad78399f152257a883d1a35f4ce9"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: christineweng <18648970+christineweng@users.noreply.github.com>
Summary
This PR allows user to edit highlighted fields in alert flyout, under
Investigations. The modal shows default highlighted fields that are defined by Elastic, and allow user to edit custom highlighted fields.Currently this feature is behind feature flag
editHighlightedFieldsEnabled(not enabled by default).Screen.Recording.2025-04-02.at.3.09.48.PM.mov
Disabled when:
User does not have security privilege
Prebuilt rule w/o enterprise license (showing upsell)
Do not show the button when:
Not an alert
rule preview
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:*label is applied per the guidelines