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][Notes] - allow filtering by note association #195501

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Oct 8, 2024

Summary

This PR adds a filter to the Notes management page, to allow users to filter by the following:

  • retrieve all notes
  • filter for notes that are associated with a document only
  • filter for notes that are associated with a saved object only (for example a timeline)
  • filter for notes that are associated with a document AND a saved object
  • filter for notes that are associated with neither a document or a saved object (orphan)
Screen.Recording.2024-10-16.at.12.03.44.AM.mov

The server side code has been updated to handle having this new filter working in combination with the existing user filter added in this previous PR.

API integration tests have been added to test the new functionality.

#193086

Checklist

@PhilippeOberti PhilippeOberti added backport release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Threat Hunting:Investigations Security Solution Investigations Team v8.16.0 labels Oct 8, 2024
@PhilippeOberti PhilippeOberti force-pushed the notes-management-filters branch 2 times, most recently from 4bce942 to 9dac72e Compare October 9, 2024 19:21
@PhilippeOberti PhilippeOberti marked this pull request as ready for review October 9, 2024 19:24
@PhilippeOberti PhilippeOberti requested review from a team as code owners October 9, 2024 19:24
@elasticmachine
Copy link
Contributor

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

@PhilippeOberti PhilippeOberti force-pushed the notes-management-filters branch from f356aac to 48fdc88 Compare October 9, 2024 22:21
@PhilippeOberti PhilippeOberti force-pushed the notes-management-filters branch 2 times, most recently from 5663352 to 434ff00 Compare October 11, 2024 20:49
@PhilippeOberti PhilippeOberti force-pushed the notes-management-filters branch from 66eac65 to 2e3b153 Compare October 16, 2024 05:18
…cument only, saved object only, both or none
@PhilippeOberti PhilippeOberti force-pushed the notes-management-filters branch from 2e3b153 to f8810f8 Compare October 16, 2024 05:34
@PhilippeOberti PhilippeOberti enabled auto-merge (squash) October 16, 2024 07:08
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 16, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Defend Workflows Cypress Tests on Serverless #8 / User Roles for Security Complete PLI with Endpoint Complete addon for role: t1_analyst "before all" hook for "should have READ access to Endpoint list page" "before all" hook for "should have READ access to Endpoint list page"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 6035 6036 +1

Async chunks

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

id before after diff
securitySolution 20.7MB 20.7MB +4.9KB
Unknown metric groups

ESLint disabled in files

id before after diff
securitySolution 85 86 +1

Total ESLint disabled count

id before after diff
securitySolution 634 635 +1

History

@PhilippeOberti PhilippeOberti merged commit 66708b2 into elastic:main Oct 16, 2024
41 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@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 Oct 16, 2024
#195501) (#196508)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution][Notes] - allow filtering by note association
(#195501)](#195501)

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

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

<!--BACKPORT [{"author":{"name":"Philippe
Oberti","email":"philippe.oberti@elastic.co"},"sourceCommit":{"committedDate":"2024-10-16T09:32:51Z","message":"[Security
Solution][Notes] - allow filtering by note association
(#195501)","sha":"66708b26c5dd2918692d77da81edcd1d3836cec5","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat
Hunting:Investigations","v8.16.0"],"title":"[Security Solution][Notes] -
allow filtering by note
association","number":195501,"url":"https://github.com/elastic/kibana/pull/195501","mergeCommit":{"message":"[Security
Solution][Notes] - allow filtering by note association
(#195501)","sha":"66708b26c5dd2918692d77da81edcd1d3836cec5"}},"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/195501","number":195501,"mergeCommit":{"message":"[Security
Solution][Notes] - allow filtering by note association
(#195501)","sha":"66708b26c5dd2918692d77da81edcd1d3836cec5"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Philippe Oberti <philippe.oberti@elastic.co>
PhilippeOberti added a commit that referenced this pull request Oct 18, 2024
…ement page, an enum value was missing from the api (#196912)

## Summary

_**Notes: please ignore the spaces introduced in the first commit,
Webstorm is trying to be smart... CI should take care of fixing that in
a second commit shortly**_

This PR fixes a small issue that prevents the notes management page to
load. The issue comes from the fact that one of the enum values passed
to filter notes was missing from the open api spec. This issue was
introduced in this recent
[PR](#195501).

Current notes management borken page
![Screenshot 2024-10-18 at 10 30
13 AM](https://github.com/user-attachments/assets/4926a62f-1ebf-4698-8a13-bf761d77f4ba)

This is the error in the network tab
![Screenshot 2024-10-18 at 10 30
29 AM](https://github.com/user-attachments/assets/90b56246-c116-4050-bcfa-2c6668274e74)

This PR fixes the issue
![Screenshot 2024-10-18 at 10 27
01 AM](https://github.com/user-attachments/assets/7d3338ce-ad73-4be5-b94c-15bcf0234680)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 18, 2024
…ement page, an enum value was missing from the api (elastic#196912)

## Summary

_**Notes: please ignore the spaces introduced in the first commit,
Webstorm is trying to be smart... CI should take care of fixing that in
a second commit shortly**_

This PR fixes a small issue that prevents the notes management page to
load. The issue comes from the fact that one of the enum values passed
to filter notes was missing from the open api spec. This issue was
introduced in this recent
[PR](elastic#195501).

Current notes management borken page
![Screenshot 2024-10-18 at 10 30
13 AM](https://github.com/user-attachments/assets/4926a62f-1ebf-4698-8a13-bf761d77f4ba)

This is the error in the network tab
![Screenshot 2024-10-18 at 10 30
29 AM](https://github.com/user-attachments/assets/90b56246-c116-4050-bcfa-2c6668274e74)

This PR fixes the issue
![Screenshot 2024-10-18 at 10 27
01 AM](https://github.com/user-attachments/assets/7d3338ce-ad73-4be5-b94c-15bcf0234680)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit bf7c5aa)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 18, 2024
…ement page, an enum value was missing from the api (elastic#196912)

## Summary

_**Notes: please ignore the spaces introduced in the first commit,
Webstorm is trying to be smart... CI should take care of fixing that in
a second commit shortly**_

This PR fixes a small issue that prevents the notes management page to
load. The issue comes from the fact that one of the enum values passed
to filter notes was missing from the open api spec. This issue was
introduced in this recent
[PR](elastic#195501).

Current notes management borken page
![Screenshot 2024-10-18 at 10 30
13 AM](https://github.com/user-attachments/assets/4926a62f-1ebf-4698-8a13-bf761d77f4ba)

This is the error in the network tab
![Screenshot 2024-10-18 at 10 30
29 AM](https://github.com/user-attachments/assets/90b56246-c116-4050-bcfa-2c6668274e74)

This PR fixes the issue
![Screenshot 2024-10-18 at 10 27
01 AM](https://github.com/user-attachments/assets/7d3338ce-ad73-4be5-b94c-15bcf0234680)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit bf7c5aa)
@PhilippeOberti PhilippeOberti deleted the notes-management-filters branch November 14, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants