-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Implement Asset Inventory filters #207094
Conversation
cbed18c
to
5301e40
Compare
|
||
const setFilterControlsUrlState = useCallback( | ||
(newFilterControls: FilterControlConfig[]) => { | ||
urlStorage.set(URL_PARAM_KEY.pageFilter, newFilterControls); |
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 think we are going to have a conflict with the Alerts page if we reuse the same key URL_PARAM_KEY.pageFilter
, it seems we are going to need to create our own key for assetInventoryPage
on https://github.com/elastic/kibana/blob/da25d13a2ac5be97216e202bf5d6bda6ff920b3b/x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_url_state.ts
082b98d
to
0a0e705
Compare
const SECURITY_ASSET_INVENTORY_DATA_VIEW = { | ||
id: 'asset-inventory-logs-default', | ||
name: 'asset-inventory-logs', | ||
}; |
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.
Note: This is temporary and will be deleted in the follow-up PR that integrates the UI with the backend
}, | ||
{ | ||
title: 'Name', | ||
fieldName: 'asset.name', // TODO this is TBD |
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.
Question: @opauloh do we know if this eventually asset.name
or agent.name
or any other value?
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.
cc @tinnytintin10, I also asked if it should be entity.name
here.
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.
If I set it to 'entity.name'
I get "Bad Request".
Leaving it for now as 'asset.name'
until further change.
// TODO Remove dataView prop when integrating with backend (fetched from hook) | ||
dataView: DataView; |
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.
Not sure of keeping as is because dataView
is fetched by the parent (AllAssets
).
...ecurity/plugins/security_solution/public/asset_inventory/components/filters/rule_type_ids.ts
Show resolved
Hide resolved
x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_url_state.ts
Show resolved
Hide resolved
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
...ons/security/plugins/security_solution/public/asset_inventory/components/filters/filters.tsx
Outdated
Show resolved
Hide resolved
...ons/security/plugins/security_solution/public/asset_inventory/components/filters/filters.tsx
Outdated
Show resolved
Hide resolved
}, | ||
{ | ||
title: 'Name', | ||
fieldName: 'asset.name', // TODO this is TBD |
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.
cc @tinnytintin10, I also asked if it should be entity.name
here.
...ecurity/plugins/security_solution/public/asset_inventory/components/filters/rule_type_ids.ts
Show resolved
Hide resolved
...ons/security/plugins/security_solution/public/asset_inventory/components/filters/filters.tsx
Show resolved
Hide resolved
x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_url_state.ts
Show resolved
Hide resolved
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 left a few comments for consideration. We should try a and separate the business login from our components.
...ons/security/plugins/security_solution/public/asset_inventory/components/filters/filters.tsx
Outdated
Show resolved
Hide resolved
...ons/security/plugins/security_solution/public/asset_inventory/components/filters/filters.tsx
Show resolved
Hide resolved
...ons/security/plugins/security_solution/public/asset_inventory/components/filters/filters.tsx
Outdated
Show resolved
Hide resolved
...ons/security/plugins/security_solution/public/asset_inventory/components/filters/filters.tsx
Outdated
Show resolved
Hide resolved
...ons/security/plugins/security_solution/public/asset_inventory/components/filters/filters.tsx
Show resolved
Hide resolved
b495df0
to
9ab06d4
Compare
@elasticmachine merge upstream |
7835ab5
to
7870f22
Compare
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.
Approving my requests and questions.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Unknown metric groupsReferences to deprecated APIs
History
cc @albertoblaz |
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.
🚀
Summary
Closes #201710.
Implements filters section for Asset Inventory reusing
FilterGroup
component from@kbn/alerts-ui-shared
package.Screenshot
Definition of done
asset.category
asset.criticality
asset.tags.name
FilterGroup
component frompackages/kbn-alerts-ui-shared
can be reused to wrap the required functionalities.AlertFilterControls
instead, which is a higher-level alternative. And that's what I did in Asset Inventory tooOut of scope
How to test
Follow the "how to test" instructions written on this PR:
Checklist
release_note:breaking
label should be applied in these situations.release_note:*
label is applied per the guidelinesRisks
No risks at all.