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

[Security Solution] Custom dashboard UI prerequisite #136409

Closed
28 of 41 tasks
angorayc opened this issue Jul 14, 2022 · 4 comments
Closed
28 of 41 tasks

[Security Solution] Custom dashboard UI prerequisite #136409

angorayc opened this issue Jul 14, 2022 · 4 comments
Assignees
Labels
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 Jul 14, 2022

To be compatible with custom dashboards, we'd like to migrate existing charts to Lens Embeddables.
Apart from adaptable with custom dashboards, users can have aligned experience when interacting with charts in security solution and Lens, means that without additional implementation, we can access the inspect, open in dev tools ...etc actions.
Therefore we can remove many of our existing implantation and make this easier to maintain.

These are all behind feature flag chartEmbeddablesEnabled. The feature flag is expected to be lifted in 8.8

Tasks

Migration to Lens Embeddable

Feature request on Lens' side


1. Donut size with the legend

  • The size of the donut should be the same with or without a legend.

Example

When we display the donut Lens Embeddable without legend it looks alright.
donut

But after enabling the legend, the donut becomes very small and it's no longer at the center of the space.
donut_w_legend

Expected

Could we have an option to overlap the legend over the donut so the size of the donut could remain the same with or without the legend. (Like we can choose to display legend inside the bar chart)


2. Donut title - To be followed up

Expected:

This is what we have in Security Solution:
Screenshot 2023-01-10 at 17 24 23

If that's not an option, could we consider apply the title / subtitle like this to the donut chart?
Screenshot 2023-01-11 at 12 39 38


3. Donut click custom actions

Use case
Navigate to a new page on clicking a portion of the donut.


4. Query without time-range Can be achieved by adHocDataView without timestamp

  • Could we support query without a time range?

Use case
SecuritySolution has some charts based on Transformed result, for example: displaying the latest value. The value has been calculated by Transform, so shouldn't worry about the performance when no timerange given.

Screenshot 2023-01-16 at 10 47 21


5. Show legend items with zero value

Example:

The current legend items in this donut should be Critical, High, Medium, and Low, but all bucket value is zero except Low, so there's only Low appears in the legend.

Screenshot 2023-01-10 at 17 33 05

Screenshot 2023-01-11 at 11 11 48

Expected:
The Legend show all the buckets, Critical, High, Medium, Low even the bucket value is zero, and each bucket stick to it's color and order, color and order shouldn't change because any of the buckets is zero
Screenshot 2023-01-11 at 09 41 50


6. Color and sort filter series

Could we choose a custom color for each filter and render the legend with the same order as the filters here?

Example
select_color_for _filter

Expected
Screenshot 2023-01-13 at 15 56 47


7. Always show values on legend items - To be followed up

Example
At the moment, no value show on legend item by default
Screenshot 2023-01-10 at 17 37 25

Value of each legend item only show on hovering the chart:
Screenshot 2023-01-10 at 17 37 38

Expected
Could we show the sum of the bucket by default, and only if users hovering on the chart, it display the value of the selected bucket.


8. Display count on treemap legend - To be followed up

Example

Screenshot 2023-01-11 at 11 58 31

Screenshot 2023-01-11 at 12 02 41

Screenshot 2023-01-11 at 11 58 43

Expected

Display doc count in the legend.
Screenshot 2023-01-11 at 12 04 27


9. An option to disable legend actions by passing a prop to Lens Embeddable


10. Color palette by Metric - To be followed up

Expected
color


11. Display multiple metric on treemap - To be followed up

multiple_metric

Expected
request

multiple metric

After putting everything together, ideally it'll look like this:

alerts_treemap

12. Icon decoration is cropped - added24th Jan 2023

Screenshot 2023-01-24 at 11 00 46

Screenshot 2023-01-24 at 11 01 23

Replace visualisations with Lens Embeddable

Bugs:

============================================================

Migration to generic inspector

@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 Jul 14, 2022
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@angorayc
Copy link
Contributor Author

The target for 8.6 is to replace the KPIs on hosts, network and users page with Lens Embeddables. This feature will be hidden behind a feature flag until we are ready.

angorayc added a commit that referenced this issue Nov 9, 2022
… Embeddables (#138369)

## Summary

This is part of #136409
In this PR we replace KPIs on Host, Network, and Users with Lens
Embeddables.

**Feature flag: chartEmbeddablesEnabled**
Please add **xpack.securitySolution.enableExperimental:
[chartEmbeddablesEnabled]** to kibana.dev.yml to verify


There shouldn't be much difference between Lens Embeddables and Elastic
Charts. This migration is more like a tech debt as Lens Embeddables have
implemented the functionality we need from fetching data to UI display,
there's no need for us to implement / maintain the same functionality
again on our side.
From the UI side, users might find that some bar charts and area charts
(e.g.: source and dest. IP, authentication success and failed) now have
two requests and responses in the inspector. That's expected, it's just
because they are query separately in Lens Embeddables.

Eventually we'd like to replace all the charts on Security Solution with
Lens Embeddable. However, this scolp is too big to ship in a single
release and we would like to have more testing before we're confident
enough, we put it behind the feature flag for now.


**To test:**
1. Apply global queries and filters
2. Apply indices from sourcerer
3. Hitting global refreshing button
4. Update time range and refetch by brushing on area charts
5. Actions in `...` button




https://user-images.githubusercontent.com/6295984/198309104-47da9069-cab5-4f48-ad41-4c441778c06c.mov



Before

<img width="1398" alt="Screenshot 2022-08-11 at 13 06 47"
src="https://user-images.githubusercontent.com/6295984/184129786-0853a2b3-7924-4833-b4e7-8212a5d5f166.png">


### 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>
@angorayc angorayc changed the title [Security Solution] Custom dashboard UI [Security Solution] Custom dashboard UI prerequisite Dec 8, 2022
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
Copy link
Contributor Author

angorayc commented Jan 17, 2023

angorayc added a commit that referenced this issue Feb 2, 2023
## Summary


Relevant issue: #136409

These are all behind feature flag `chartEmbeddablesEnabled`

---
### Changes:
1. Legends are all moved to the left side of the chart to avoid
overlapping with chart actions.
2. The second `group by` of Alerts Trend Chart is removed (as it is
always disabled).


---

### Events:
<img width="2545" alt="Screenshot 2023-01-25 at 15 33 27"
src="https://user-images.githubusercontent.com/6295984/214605761-2e08d848-feb3-42e3-9850-08cd7f8b9c99.png">

---
### Top N

<img width="2552" alt="Screenshot 2023-01-25 at 15 34 21"
src="https://user-images.githubusercontent.com/6295984/214605889-91f74c33-e8c4-43ac-b137-6098f4764a6d.png">

---

### No indices:
<img width="1671" alt="Screenshot 2022-12-21 at 17 03 05"
src="https://user-images.githubusercontent.com/6295984/208963467-ccbb6bf4-11b3-4bc8-b568-208dd0791828.png">

---

### Alerts - Trend
<img width="2548" alt="Screenshot 2023-01-25 at 15 34 52"
src="https://user-images.githubusercontent.com/6295984/214605993-ea1a2fe5-6f44-4c70-9152-79f76ed9e48f.png">

---

### ~Alerts - Treemap~ (Not included in this PR -
#149592)
**Big Difference after converting to Lens. Likely to have a redesign:**

Known issues:
1. Alerts tree map: Is not rendered exactly the same due to the limits
of dimension of Lens.
3. No value display in each legend item for alerts tree map
4. Background color cannot be decided by risk score


Before:
<img width="1661" alt="Screenshot 2023-01-10 at 12 00 51"
src="https://user-images.githubusercontent.com/6295984/211546444-f98b0f4a-0666-493c-b57e-934b3d154211.png">

After:
<img width="2550" alt="Screenshot 2023-01-25 at 15 35 16"
src="https://user-images.githubusercontent.com/6295984/214606117-7a1e78a4-8947-4d95-9994-2acb106ca3af.png">

---
### ~Alerts - Charts~ (Not included in this PR -
#149592)
**Lens does not support the
[design](elastic/security-team#5599). Likely
to have a redesign:**


<img width="2536" alt="Screenshot 2023-01-25 at 15 35 55"
src="https://user-images.githubusercontent.com/6295984/214606298-bcc97920-bb52-4367-901f-102a778799b6.png">

---

### Alerts - Table
<img width="1666" alt="Screenshot 2022-12-21 at 17 12 25"
src="https://user-images.githubusercontent.com/6295984/208964514-b39e40ae-ecb4-4e06-8cc5-32d63e28823a.png">

Known issues:
1. #149828
2. Unable to restore a column after hiding it.
3. #150048
4. #150158


---
### Alerts - Preview

Known issue:
There's no legend in alerts preview as its legend action, filter in,
filter out are not useful on rule creation page. -
#149220

<img width="2543" alt="Screenshot 2023-01-26 at 13 32 00"
src="https://user-images.githubusercontent.com/6295984/214848163-437ca866-46ee-47ee-a550-aa3b9c97eef6.png">





### Checklist

- [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 added a commit that referenced this issue Mar 7, 2023
## Summary

**Original Issue**
#136409

**Preview**
https://kibana-pr-150531.kb.us-west2.gcp.elastic-cloud.com:9243/

https://p.elstc.co/paste/G+PhWdS0#WEyGBtMD9I4r74WPNIQFvgELZPOp-SZCG3yja1LOuwQ

**Migrated charts**
#149123

**Known issues of the Embeddables after enabling the feature flag:** 
#136409 (Feature request on
Lens’ side & Bugs section)

**Charts not supported by Lens Embeddable:**
#149592

### 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>
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this issue Mar 10, 2023
…ic#150531)

## Summary

**Original Issue**
elastic#136409

**Preview**
https://kibana-pr-150531.kb.us-west2.gcp.elastic-cloud.com:9243/

https://p.elstc.co/paste/G+PhWdS0#WEyGBtMD9I4r74WPNIQFvgELZPOp-SZCG3yja1LOuwQ

**Migrated charts**
elastic#149123

**Known issues of the Embeddables after enabling the feature flag:** 
elastic#136409 (Feature request on
Lens’ side & Bugs section)

**Charts not supported by Lens Embeddable:**
elastic#149592

### 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>
@angorayc angorayc closed this as completed May 3, 2023
angorayc added a commit that referenced this issue Jan 12, 2024
…sEnabled feature flag (#173884)

## Summary

This PR is a part of #171287,
the final goal is to remove `chartEmbeddablesEnabled` feature flag
1. Enabling and removing **alertsPreviewChartEmbeddablesEnabled**
feature flag (It's unblocked by
#136409 item 9)
2. Replacing **rules preview** histogram with Lens Embeddable.



https://github.com/elastic/kibana/assets/6295984/c29aa600-c86b-4d32-933b-4d8f6f1fd04f



![Screenshot 2024-01-02 at 21 47
39](https://github.com/elastic/kibana/assets/6295984/300b1357-12fe-4601-b4c2-0c97cc5d5bba)

![Screenshot 2024-01-09 at 02 18
37](https://github.com/elastic/kibana/assets/6295984/832bbb04-477e-4c71-8589-4cec19da5c6e)

### 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

No branches or pull requests

2 participants