-
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
[Cloud Posture] [Quick wins] Enable edit DataView on the Misconfigurations Findings Table #173870
[Cloud Posture] [Quick wins] Enable edit DataView on the Misconfigurations Findings Table #173870
Conversation
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
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.
tested, works great!
couple of general questions, not directly related to the PR
@@ -62,15 +62,19 @@ export const useLatestFindingsDataView = (dataView: string) => { | |||
} |
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.
btw what use perfected kibana data views
means (in the TODO for this hook)? not directly related to this PR, but I'd add more context to this todo, as I for instance wouldn't know what to do with it
@@ -50,7 +50,11 @@ export const Configurations = () => { | |||
path={findingsNavigation.findings_default.path} | |||
render={() => ( | |||
<TrackApplicationView viewId={findingsNavigation.findings_default.id}> | |||
<LatestFindingsContainer dataView={dataViewQuery.data!} /> | |||
<LatestFindingsContainer | |||
dataView={dataViewQuery.data!} |
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.
Couple of general questions:
- any downside in passing
dataViewQuery
to avoid having these three props being passed together all the time? - we don't use context that much in our code, wdyt about the context for the dataView to avoid this multi layer prop drill?
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.
any downside in passing dataViewQuery to avoid having these three props being passed together all the time?
IMO the downside is that we add a deep coupling with an object from the react-query
third-party library which is an implementation detail, then we need to mock the library to be able to unit test it, and these tests won't be so reliable in case something break in future releases of the library.
we don't use context that much in our code, wdyt about the context for the dataView to avoid this multi layer prop drill?
that's a good suggestion, better than passing down a react-query
object, I created a technical debt ticket to address that in a follow up PR
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
* main: (4129 commits) [Logs Explorer] Change the default link for "Discover" in the serverless nav (#173420) [Fleet] fix unhandled error in agent details when components are missing (#174152) [Obs UX] Unskip transaction duration alerts test (#174069) [Fleet] Fix keep policies up to date after package install (#174093) [Profiling] Stack traces embeddable (#173905) [main] Sync bundled packages with Package Storage (#174115) [SLO Form] Refactor to use kibana data view component (#173513) [Obs UX] Unskip APM Service Inventory Journey (#173510) [Obs UX] Unskip preview_chart_error_count test (#173624) [api-docs] 2024-01-03 Daily api_docs build (#174142) Update babel runtime helpers (#171745) Handle content stream errors in report pre-deletion (#173792) [Cloud Posture] [Quick wins] Enable edit DataView on the Misconfigurations Findings Table (#173870) [ftr] abort retry on invalid webdriver session (#174092) Upgrade openai to 4.24.1 (#173934) chore(NA): bump node into v20 (#173461) [Security Solution][Endpoint] Fix index name pattern in SentinelOne dev. script (#174105) fix versions.json [Obs AI Assistant] Add guardrails (#174060) [ML] Transforms: Refactor validators and add unit tests. (#173736) ...
Summary
This PR is part of the Quick Wins improvements for 8.13.0. It enables the Edit DataView option on the Misconfigurations Findings Page.
It also adds the following:
CloudSecurityDataTable
component.useCloudSecurityTable
hook.useLatestFindingsDataView
hook to only update when needed (This update logic is planned to be replaced by a server-side callback when installing the Cloud Security integration. Still, for now, it is an improvement over the current logic).Screenshots