Skip to content
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

[Security Solution] Update alert kpi to exclude closed alerts in document details flyout #200268

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

christineweng
Copy link
Contributor

@christineweng christineweng commented Nov 14, 2024

Summary

This PR made some changes to the alert count API in document details flyout. Closed alerts are now removed when showing total count and distributions. Data fetching logic is updated to match the one used in host flyout (#197102).

Notable changes:

  • Closed alerts are now excluded
  • Number of alerts in alerts flyout should match the ones in host flyout
  • Clicking the number will open timeline with the specific entity and NOT kibana.alert.workflow_status: closed filters
  • If a host/user does not have active alerts (all closed), no distribution bar is shown
Screen.Recording.2024-11-14.at.4.05.08.PM.mov

Checklist

@christineweng christineweng added this to the 8.17 milestone Nov 14, 2024
@christineweng christineweng self-assigned this Nov 14, 2024
@christineweng christineweng marked this pull request as ready for review November 14, 2024 22:16
@christineweng christineweng requested a review from a team as a code owner November 14, 2024 22:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for bringing the consistent behavior between the entity and the alerts details flyout. Desk tested and code LGTM!

oas_docs/output/kibana.serverless.yaml Outdated Show resolved Hide resolved
@christineweng christineweng force-pushed the update-flyout-alert-kpi branch from 13423c2 to a1b38ce Compare November 18, 2024 17:39
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 13.4MB 13.4MB -5.2KB

History

cc @christineweng

@christineweng christineweng merged commit a37a02e into elastic:main Nov 18, 2024
44 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11899860727

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 18, 2024
…ment details flyout (elastic#200268)

## Summary

This PR made some changes to the alert count API in document details
flyout. Closed alerts are now removed when showing total count and
distributions. Data fetching logic is updated to match the one used in
host flyout (elastic#197102).

Notable changes:
- Closed alerts are now excluded
- Number of alerts in alerts flyout should match the ones in host flyout
- Clicking the number will open timeline with the specific entity and
`NOT kibana.alert.workflow_status: closed` filters
- If a host/user does not have active alerts (all closed), no
distribution bar is shown

https://github.com/user-attachments/assets/3a1d6e36-527e-4b62-816b-e1f4de7314ca

### Checklist

- [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

(cherry picked from commit a37a02e)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Nov 18, 2024
…n document details flyout (#200268) (#200642)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Update alert kpi to exclude closed alerts in
document details flyout
(#200268)](#200268)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"christineweng","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T19:42:34Z","message":"[Security
Solution] Update alert kpi to exclude closed alerts in document details
flyout (#200268)\n\n## Summary\r\n\r\nThis PR made some changes to the
alert count API in document details\r\nflyout. Closed alerts are now
removed when showing total count and\r\ndistributions. Data fetching
logic is updated to match the one used in\r\nhost flyout
(https://github.com/elastic/kibana/pull/197102).\r\n\r\nNotable
changes:\r\n- Closed alerts are now excluded\r\n- Number of alerts in
alerts flyout should match the ones in host flyout\r\n- Clicking the
number will open timeline with the specific entity and\r\n`NOT
kibana.alert.workflow_status: closed` filters\r\n- If a host/user does
not have active alerts (all closed), no\r\ndistribution bar is
shown\r\n\r\n\r\nhttps://github.com/user-attachments/assets/3a1d6e36-527e-4b62-816b-e1f4de7314ca\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a37a02efcff84282aafb1b94778fd09f0f2025f0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","backport","v9.0.0","Team:Threat
Hunting","Team:Threat
Hunting:Investigations","v8.17.0"],"title":"[Security Solution] Update
alert kpi to exclude closed alerts in document details
flyout","number":200268,"url":"https://github.com/elastic/kibana/pull/200268","mergeCommit":{"message":"[Security
Solution] Update alert kpi to exclude closed alerts in document details
flyout (#200268)\n\n## Summary\r\n\r\nThis PR made some changes to the
alert count API in document details\r\nflyout. Closed alerts are now
removed when showing total count and\r\ndistributions. Data fetching
logic is updated to match the one used in\r\nhost flyout
(https://github.com/elastic/kibana/pull/197102).\r\n\r\nNotable
changes:\r\n- Closed alerts are now excluded\r\n- Number of alerts in
alerts flyout should match the ones in host flyout\r\n- Clicking the
number will open timeline with the specific entity and\r\n`NOT
kibana.alert.workflow_status: closed` filters\r\n- If a host/user does
not have active alerts (all closed), no\r\ndistribution bar is
shown\r\n\r\n\r\nhttps://github.com/user-attachments/assets/3a1d6e36-527e-4b62-816b-e1f4de7314ca\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a37a02efcff84282aafb1b94778fd09f0f2025f0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200268","number":200268,"mergeCommit":{"message":"[Security
Solution] Update alert kpi to exclude closed alerts in document details
flyout (#200268)\n\n## Summary\r\n\r\nThis PR made some changes to the
alert count API in document details\r\nflyout. Closed alerts are now
removed when showing total count and\r\ndistributions. Data fetching
logic is updated to match the one used in\r\nhost flyout
(https://github.com/elastic/kibana/pull/197102).\r\n\r\nNotable
changes:\r\n- Closed alerts are now excluded\r\n- Number of alerts in
alerts flyout should match the ones in host flyout\r\n- Clicking the
number will open timeline with the specific entity and\r\n`NOT
kibana.alert.workflow_status: closed` filters\r\n- If a host/user does
not have active alerts (all closed), no\r\ndistribution bar is
shown\r\n\r\n\r\nhttps://github.com/user-attachments/assets/3a1d6e36-527e-4b62-816b-e1f4de7314ca\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a37a02efcff84282aafb1b94778fd09f0f2025f0"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: christineweng <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…ment details flyout (elastic#200268)

## Summary

This PR made some changes to the alert count API in document details
flyout. Closed alerts are now removed when showing total count and
distributions. Data fetching logic is updated to match the one used in
host flyout (elastic#197102).

Notable changes:
- Closed alerts are now excluded
- Number of alerts in alerts flyout should match the ones in host flyout
- Clicking the number will open timeline with the specific entity and
`NOT kibana.alert.workflow_status: closed` filters
- If a host/user does not have active alerts (all closed), no
distribution bar is shown


https://github.com/user-attachments/assets/3a1d6e36-527e-4b62-816b-e1f4de7314ca



### Checklist

- [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants