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.
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
[Cloud Security] Clicking on Contextual Flyout popout Icon now opens page in new tab #196763
[Cloud Security] Clicking on Contextual Flyout popout Icon now opens page in new tab #196763
Changes from 9 commits
82ff137
f09dce8
5dd8c78
ac0df66
9d2632e
e313319
35cc693
c63540f
19135a8
cdb9f8c
3303859
bf7e3ee
d32c49b
3a98256
41c2c90
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be replaced with
services.data
as we only rely on data serviceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need to fallback to
SECURITY_DEFAULT_DATA_VIEW_ID
as the fallback already a part ofqueryFilters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the use of
SECURITY_DEFAULT_DATA_VIEW_ID
. Similarly I don't understand whyuseNavigateFindings
anduseNavigateVulnerabilities
differ in the data view id logic. Similarly toCDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX
we haveCDR_VULNERABILITIES_DATA_VIEW_ID_PREFIX
. Why don't we use it inuseNavigateVulnerabilities
then? And in your new logic you only useSECURITY_DEFAULT_DATA_VIEW_ID
, so we have a variety of difference here. @opauloh do you recall anything about the use of data view ids for the navigation?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey that was added on this PR
If we don't specify the DataView on the filter when navigating to the findings page, the FilterManager will fallback to the default in the sorcerer (
logs-*
). This doesn't prevent filtering from working, but it doesn't allow for editing the filter, since the SearchBar component is configured to accept only the Latest Misconfigurations Dataview (or the Latest Vulnerabilities DataView on the Vulnerabilities tab).So the fix was to specify the Dataview for each filter, and then the edit filter works:
Should probably have added it as a comment, which I suggest @animehart to add so we can recall when going over it in the future.
Another solution could be to update the navigation to set the sorcerer index pattern instead of setting it per filter, but that also involves setting a Dataview in the navigation logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed clarification, makes sense! Agree that we need to add a comment as this Data View logic pieces are quite complicated to grasp without all the context. I think this logic should also be added to the vulnerability navigation logic, right now it looks like it is not part of it, unless I missed that in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@animehart we still don't pass vulnerabiltiy dataview id to the navigation, while for findings we do. Should we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxcold
if there aren't anything that can be broken by it then I think we should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we plan to backport this to 8.16 let's not add this new logic, just to be on the safe side. We can do it separately for 8.17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since
useGetNavigationUrlParams
returns a function its better to name the return valuegetNavUrlParams
so if you want to extract its own return value it would make sense to read as in: