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

[SecuritySolution] Page crashes after editing the filter applied from a Lens Embeddable. #148710

Closed
angorayc opened this issue Jan 11, 2023 · 4 comments · Fixed by #149048
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team

Comments

@angorayc
Copy link
Contributor

angorayc commented Jan 11, 2023

Here is a question about the filter added to global search bar after clicking on a donut chart. In Lens, there’s no problem editing the filter, but in Lens Embeddable we applied, it crashes after editing the filter.

Please add this to kibana.dev.yml
xpack.securitySolution.enableExperimental: ['alertsPageChartsEnabled','chartEmbeddablesEnabled']

Screen.Recording.2023-01-11.at.10.06.51.mov

Screenshot 2023-01-11 at 10 15 24

@botelastic botelastic bot added the needs-team Issues missing a team label label Jan 11, 2023
@angorayc angorayc added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jan 11, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 11, 2023
@dej611 dej611 added bug Fixes for quality problems that affect the customer experience Feature:Lens impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Jan 11, 2023
@dej611 dej611 self-assigned this Jan 11, 2023
@dej611 dej611 added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Jan 11, 2023
@dej611
Copy link
Contributor

dej611 commented Jan 12, 2023

Had an investigation spike on this, and managed to find out the problem here:

https://github.com/elastic/kibana/blob/7d69a45c9053365158f6bb47e17901ebd33452b8/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx#LL425C22-L429C22

The indexPattern is just a basic object rather than an instance of a DataView, and in multiple places a casting is forcing the type to pass the dataview to the unifiedsearch component:

A basic way to fix this would be to just add a getName() method in the first place, but a better solution would be to actually pass over to the unifiedsearch component an instance of DataView

@angorayc angorayc added Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore labels Jan 12, 2023
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@angorayc angorayc self-assigned this Jan 12, 2023
@stratoula stratoula removed the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jan 12, 2023
@dej611 dej611 removed their assignment Jan 13, 2023
angorayc added a commit that referenced this issue Jan 17, 2023
## Summary

Behind feature flag `chartEmbeddablesEnabled`

- Replace host and user risk scores donut charts with Lens
- Known issue: 

1. legend is temporary disabled as Lens does not render the legend if
its value is zero. - #136409 -
please find `There is a logic in Lens that it doesn't show the legend
item if its value is zero - Could we have the option to show the legend
even the value it represent is zero.` for more details about this bug.
2. No title in the donut by default when open in Lens. -
#136409 - please find `No title
in the donut by default when open in Lens - Could we have an option to
display title / subtitle outside` for more details about this bug.
3. #148710
4. Color palette does not match with the setting of Host / User risk
score classification - as it uses one of the color palette settings in
Lens. - #136409 - please find
`Could we choose a custom color for each filter and render the legend
with the same order as the filters here?`

<img width="1659" alt="Screenshot 2023-01-12 at 12 54 54"
src="https://user-images.githubusercontent.com/6295984/212071852-a5107aa7-0249-41d3-a8be-de337745888d.png">

5. Lens do not support query without a timerange, which makes the data
not aligned on the page. -
#136409 - `Could we support
query without a time range?`



### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [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>
@angorayc angorayc changed the title Page crashes after editing the filter applied from a Lens Embeddable. [SecuritySolution] Page crashes after editing the filter applied from a Lens Embeddable. Jan 17, 2023
angorayc added a commit that referenced this issue Jan 23, 2023
## Summary

Fixes: #148710

<img width="1677" alt="Screenshot 2023-01-11 at 10 15 24"
src="https://user-images.githubusercontent.com/6295984/211781537-55c15301-fb61-48d6-aa17-0098d60fb46e.png">


**Steps to verify:**
1. Enable feature flags: Please add this to kibana.dev.yml
`xpack.securitySolution.enableExperimental: ['chartEmbeddablesEnabled']`

2. Go to alerts host details page.
3. Click on the donut chart to apply the filter.
4. Click the filter it applied to global search bar, and select `Edit
filter`.
5. Should edit the filter successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants