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

[8.x] [Security Solution][Alert details] - improving session view experience in expandable flyout (#200270) #205834

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…e in expandable flyout (elastic#200270)

## Summary

This [PR](elastic#192531) started the
move of the analyzer and session view components from the table to the
flyout. Shortly after we added an advanced settings (via this
[PR](elastic#194012)) to allow users to
switch back and forth between the old table view and the flyout view.

This current PR focuses on the session view component and enhances its
user experience, when rendered in the expandable flyout.

No changes should be made for the user in the table as well as the other
usages of the session view component (like for example the Kubernetes
dashboard).

#### Old UI (in table)

https://github.com/user-attachments/assets/015b32fc-69bb-4526-a42d-accad085ad43

####. New UI (in flyout)

https://github.com/user-attachments/assets/9a3eacbf-bf2b-43d4-8e74-ea933ee0d498

As can seen in the video above, when the session view component is
opened in the expandable flyout, we show the tree view and the detailed
panel separated. This allow for better use of the horizontal space,
especially visible on a wide monitor. This is also combined with the
fact that the flyout is resizable (and can take the whole screen) and
the preview panel is also resizable, to provide more space to the
detailed panel.

Note: the session view full screen functionality is lost, but this is by
design. As mentioned above, the user can resize the flyout's width to
take the full screen, and the flyout's vertical space is already near
full height.

## Code decisions

To guarantee as much as possible that the usage of the Session View
component in the table or in the other places (like the Kubernetes
dashboard) were not impacted by this PR, only additive changes were
made. All these changes are also protected behind `if` conditions, that
should only be run when the correct props are being passed in.
Some components (like the content of each of the tabs of the detailed
panels - Process, Metadata and Alerts) as well as a hook, are exposed
outisde of the `session_view` plugin, to be reused in the expandable
flyout directly.

Code changes were kept to a bare minimum in the `session_view` plugin!

## What to test

- functionality of the Session View component should be exactly the same
when used in the table as when used in the flyout:
- clicking on a row in the tree should update the detailed panel
accordingly
- jumping to a process from the detailed panel should correctly update
the tree
  - viewing the details of an alert should work
  - the
- the UI will be mostly the same, with some small tweaks:
- viewing an alert details now opens a preview panel instead of the
flyout. The user can go back to the previous panel by clicking on the
`Back` button in the top-left corner
- the alerts tab does not show the number of alerts as it previously
was. We might be able to get this to work later, but after discussing
with Product this is an acceptable solution as the feature is still
behind an Advanced Settings
- the `Open details` has been replaced by a `expand` icon button, to be
more consistent with the rest of the UI in the flyout

### Notes:
- there is a small update in the analyzer graph to the icon used in the
open detail button. We're now using the `expand` icon to be consistent
with the Session View component (which already has another `eye` icon)

## How to test

- turn on the `securitySolution:enableVisualizationsInFlyout` Advanced
Settings
![Screenshot 2024-12-16 at 5 05
05 PM](https://github.com/user-attachments/assets/e5a937fa-7eaf-46b3-be11-d56224daf821)
- generate alerts with data for session view (`yarn test:generate -n
http://elastic:changeme@localhost:9200 -k
http://elastic:changeme@localhost:5601`)

---------

Co-authored-by: Paulo Silva <[email protected]>
(cherry picked from commit d4a3c96)
@kibanamachine kibanamachine merged commit a6b07b9 into elastic:8.x Jan 8, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants