-
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
[SecuritySolution] Replace donuts with Lens #148519
Conversation
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
label={STATUS_OPEN} | ||
title={<ChartLabel count={openCount} />} | ||
totalCount={openCount} | ||
isChartEmbeddablesEnabled={isChartEmbeddablesEnabled} |
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 isChartEmbeddablesEnabled
is true though, this component wouldnt render as As AlertDonutEmbeddable would :P. Same for the instances below it. I think you can remove the prop.
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.
OK, I have this removed in this PR: https://github.com/elastic/kibana/pull/147261/files
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 @angorayc this looks great. I went through the code as well as tested the build and it all looks good.
Some questions:
It looks like youre trying to swap out all usage of DonutCharts in favour of lens embeddables, leaving the only usage of DonutChart on the Alerts page and Risk score. Is that because of the lack of legend?
Also, am i right in assuming the default behaviour for lens embeddable clicks is to add a filter. Is that something we can plug in to? Curious because it has ramifications for something I was working on- routing to the Alert page on click from the donut charts on the Explore pages.
Finally, it looks like the bug Steph fixed might impact [useRefetchByRestartingSession](https://github.com/elastic/kibana/blob/ee27615e644cf391b7b04ea44f1d3fc88bf6031c/x-pack/plugins/security_solution/public/explore/containers/use_refetch_by_session.tsx)
I dont think in an adverse way though.
Because this PR has lots of files changed already, so I'd like to replace them in a follow up PR.
Yup, should be able to do that. I'll put it on the list.
Thanks for the heads up, I'm looking to that with Steph. |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @angorayc |
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.
Only checked linter changes on x-pack/plugins/security_solution/public/management/cypress/tsconfig.json
@@ -22,6 +22,8 @@ | |||
"path": "../../../tsconfig.json", | |||
"force": true | |||
}, | |||
"@kbn/security-plugin" | |||
"@kbn/security-plugin", |
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 linter changes from management folder
…changed (#148552) ## Summary Found these js warning after replacing charts with Lens in #148519: <img width="1671" alt="Screenshot 2023-01-09 at 15 31 17" src="https://user-images.githubusercontent.com/6295984/211345750-8c4e67ee-bf96-49d2-8bb2-0f71e5f9bcd2.png"> Wrap `search.session.start()` with useEffect to avoid incorrect state changed. ### Checklist Delete any items that are not applicable to this PR. - [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 Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
## Summary This pr is a part of elastic#147261: Replace donut charts with Lens: This is behind feature flag `chartEmbeddablesEnabled ` Items to verify: 1. If the queries and filters from the global search box are applied. 2. If the correct alert index is applied by different spaced. 3. Visualization actions working correctly. Detection and Response dashboard: <img width="1662" alt="Screenshot 2023-01-09 at 09 21 56" src="https://user-images.githubusercontent.com/6295984/211275765-8177e9bd-3623-4bb2-b1d9-8a3044d523a0.png"> Host details: <img width="1666" alt="Screenshot 2023-01-09 at 09 21 38" src="https://user-images.githubusercontent.com/6295984/211275770-be95353f-4d1b-410a-b7bf-b232692af1ab.png"> User details: <img width="1662" alt="Screenshot 2023-01-09 at 09 21 19" src="https://user-images.githubusercontent.com/6295984/211275773-dd0bcaaf-58e6-404b-b010-d1c464cbd101.png"> Network details: <img width="1663" alt="Screenshot 2023-01-09 at 09 20 47" src="https://user-images.githubusercontent.com/6295984/211275775-0fd39ac3-e977-44bd-bd40-304463dce613.png"> Known issues: 1. Not showing legend for alerts donut charts at the moment: There is a logic in Lens that it doesn't show the legend item if its value is zero. 4. JS warnings triggered by incorrect state changed. Fixed by elastic#148552 5. No label in the donut by default when open in Lens - Lens doesn't support displaying a label in the middle of the donut chart by default, so it is currently available in Security Solution. 6. Applying filters or extra action while clicking the donut is not available atm ### Checklist Delete any items that are not applicable to this PR. - [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 Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…changed (elastic#148552) ## Summary Found these js warning after replacing charts with Lens in elastic#148519: <img width="1671" alt="Screenshot 2023-01-09 at 15 31 17" src="https://user-images.githubusercontent.com/6295984/211345750-8c4e67ee-bf96-49d2-8bb2-0f71e5f9bcd2.png"> Wrap `search.session.start()` with useEffect to avoid incorrect state changed. ### Checklist Delete any items that are not applicable to this PR. - [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 Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Summary
This pr is a part of #147261: Replace donut charts with Lens:
This is behind feature flag
chartEmbeddablesEnabled
Items to verify:
Detection and Response dashboard:
![Screenshot 2023-01-09 at 09 21 56](https://user-images.githubusercontent.com/6295984/211275765-8177e9bd-3623-4bb2-b1d9-8a3044d523a0.png)
Host details:
![Screenshot 2023-01-09 at 09 21 38](https://user-images.githubusercontent.com/6295984/211275770-be95353f-4d1b-410a-b7bf-b232692af1ab.png)
User details:
![Screenshot 2023-01-09 at 09 21 19](https://user-images.githubusercontent.com/6295984/211275773-dd0bcaaf-58e6-404b-b010-d1c464cbd101.png)
Network details:
![Screenshot 2023-01-09 at 09 20 47](https://user-images.githubusercontent.com/6295984/211275775-0fd39ac3-e977-44bd-bd40-304463dce613.png)
Known issues:
Checklist
Delete any items that are not applicable to this PR.