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] Alerts Grouping MVP #149145

Merged
merged 61 commits into from Feb 7, 2023

Conversation

YulNaumenko
Copy link
Contributor

@YulNaumenko YulNaumenko commented Jan 18, 2023

Current PR introducing the new grouping functionality to the alerts tables: on Alerts and Rule Details pages.
The existing grouping design is a technical preview functionality and is a subject of the change.
MVP description:

  1. Grouping is available only for alerts tables on the Alerts and Rules Details page as selectable dropdown options list in the right top level menu of the alerts table:

Screenshot 2023-01-28 at 2 00 33 PM

2. Default selected option "None" means that the group alerts by is turned off and none of the field is selected. In 8.7 feature has a **technical preview** badge on the right of the select option.

Screenshot 2023-01-28 at 2 21 24 PM

3. The default fields options list is different for Alerts and Rule Details pages and relevant to the page context:

Screenshot 2023-01-28 at 2 30 02 PM

Screenshot 2023-01-28 at 2 31 22 PM

  1. Group by custom field is a separate option which allows to group the alerts data by any other index field.

Screenshot 2023-01-28 at 2 34 28 PM

  1. Custom field provides a limited to the field value only default rendering for the panel and default set of stats metrics: Rules count and Alerts count.

Screenshot 2023-01-28 at 2 35 47 PM

For rule name for example the is also additionally rendered metrics, rule name, rule description and rule tags:

Screenshot 2023-01-28 at 2 40 02 PM

  1. Each group panel provides the list of bulk actions options which could be applied to the whole group by clicking on the Take actions button. For now the list is limited to the three available actions:

Screenshot 2023-01-28 at 2 32 24 PM

  1. Existing technical preview functionality is limited to display only one expanded group at a time.
  2. For a big number of groups there is a paging functionality with the ability to define the items per page:

Screenshot 2023-01-28 at 2 32 40 PM

9. Grouping setting is stored in the local storage for each page separately and after the hard refresh should be picked up and rendered on the page.

…rouping-mvp

# Conflicts:
#	x-pack/plugins/security_solution/public/common/components/event_rendered_view/helpers.ts
@YulNaumenko YulNaumenko self-assigned this Jan 18, 2023
@YulNaumenko YulNaumenko added the ci:cloud-deploy Create or update a Cloud deployment label Jan 26, 2023
@YulNaumenko YulNaumenko added v8.7.0 release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team labels Jan 26, 2023
Comment on lines +85 to +88
{
title: i18n.STATS_GROUP_USERS,
value: bucket.usersCountAggregation?.value ?? 0,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nit: looks like the badge value isn't centered when defaulting to 0.

image

Looks like there's an extra span in there keeping things centered when a value is present

DevTools_-_localhost_5601_kbn_app_security_rules_id_a7bd4040-a337-11ed-947e-e5d337f16d85_alerts

@@ -94,7 +94,6 @@ export const LandingCards = memo(() => {
<EuiFlexItem>
<iframe
allowFullScreen
allowTransparency
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the video component on the getting started page right? Is this a fix? I'm not seeing a difference with/without this attribute on chrome. 🤷‍♂️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrmmm, was thinking it was theme related, but seeing the white bg with or without this attribute, so not sure, haha 😅

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephmilovic, you should know. I'm not sure about this change.

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out, tested locally, and performed code review -- LGTM! Great work here @YulNaumenko! 🙂 🙌 🚀

I tested thoroughly and came across no major issues at all! Left some nits and questions, but nothing that can't be addressed in a follow-up if need be, so going ahead and approving now. Really nice implementation btw, and users are gonna be so stoked to finally have grouping! 🎉

YulNaumenko and others added 4 commits February 4, 2023 15:20
…ping/groups_selector/custom_field_panel.tsx

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
…ping/groups_selector/index.tsx

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great work, awesome new feature 🥇

@YulNaumenko
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

kibana-ci commented Feb 7, 2023

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 3586 3603 +17

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 12.9MB 13.0MB +121.2KB
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 426 427 +1

References to deprecated APIs

id before after diff
securitySolution 384 389 +5

Total ESLint disabled count

id before after diff
securitySolution 503 504 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @YulNaumenko

@YulNaumenko YulNaumenko merged commit 705ba7b into elastic:main Feb 7, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Feb 7, 2023
darnautov pushed a commit to darnautov/kibana that referenced this pull request Feb 7, 2023
Current PR introducing the new grouping functionality to the alerts
tables: on Alerts and Rule Details pages.
The existing grouping design is a technical preview functionality and is
a subject of the change.
MVP description:
1. Grouping is available only for alerts tables on the Alerts and Rules
Details page as selectable dropdown options list in the right top level
menu of the alerts table:
<img width="1565" alt="Screenshot 2023-01-28 at 2 00 33 PM"
src="https://user-images.githubusercontent.com/55110838/215293513-a46e5989-0e49-4b4c-b191-e00d6ef14eff.png">
2. Default selected option "None" means that the group alerts by is
turned off and none of the field is selected. In 8.7 feature has a
**technical preview** badge on the right of the select option.
<img width="373" alt="Screenshot 2023-01-28 at 2 21 24 PM"
src="https://user-images.githubusercontent.com/55110838/215293745-ae232e12-eb92-4429-a667-7b76a2be8c61.png">
3. The default fields options list is different for Alerts and Rule
Details pages and relevant to the page context:
<img width="1555" alt="Screenshot 2023-01-28 at 2 30 02 PM"
src="https://user-images.githubusercontent.com/55110838/215294128-a0e2a875-088b-446e-ba96-28bcb1d114d0.png">
<img width="1498" alt="Screenshot 2023-01-28 at 2 31 22 PM"
src="https://user-images.githubusercontent.com/55110838/215294132-0ca11882-73e9-446c-9e75-112569b9bdc7.png">

4. Group by custom field is a separate option which allows to group the
alerts data by any other index field.
<img width="980" alt="Screenshot 2023-01-28 at 2 34 28 PM"
src="https://user-images.githubusercontent.com/55110838/215294168-f787093c-72e9-483d-8881-70320b1f4343.png">

5. Custom field provides a limited to the field value only default
rendering for the panel and default set of stats metrics: Rules count
and Alerts count.
<img width="1209" alt="Screenshot 2023-01-28 at 2 35 47 PM"
src="https://user-images.githubusercontent.com/55110838/215294237-17c6105c-d9a3-4ced-be2b-c17ffd181e14.png">
For rule name for example the is also additionally rendered metrics,
rule name, rule description and rule tags:
<img width="1899" alt="Screenshot 2023-01-28 at 2 40 02 PM"
src="https://user-images.githubusercontent.com/55110838/215294351-8935ee93-c416-4357-80cd-ce28c0127993.png">

6. Each group panel provides the list of bulk actions options which
could be applied to the whole group by clicking on the **Take actions**
button. For now the list is limited to the three available actions:
<img width="1557" alt="Screenshot 2023-01-28 at 2 32 24 PM"
src="https://user-images.githubusercontent.com/55110838/215294393-513dc001-be83-4f76-ac09-3a36b2b89e00.png">

7. Existing technical preview functionality is limited to display only
one expanded group at a time.
8. For a big number of groups there is a paging functionality with the
ability to define the items per page:
<img width="735" alt="Screenshot 2023-01-28 at 2 32 40 PM"
src="https://user-images.githubusercontent.com/55110838/215294444-98dfef11-b6b5-413b-b82f-0dcea90f0e65.png">
9. Grouping setting is stored in the local storage for each page
separately and after the hard refresh should be picked up and rendered
on the page.

---------

Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
benakansara pushed a commit to benakansara/kibana that referenced this pull request Feb 7, 2023
Current PR introducing the new grouping functionality to the alerts
tables: on Alerts and Rule Details pages.
The existing grouping design is a technical preview functionality and is
a subject of the change.
MVP description:
1. Grouping is available only for alerts tables on the Alerts and Rules
Details page as selectable dropdown options list in the right top level
menu of the alerts table:
<img width="1565" alt="Screenshot 2023-01-28 at 2 00 33 PM"
src="https://user-images.githubusercontent.com/55110838/215293513-a46e5989-0e49-4b4c-b191-e00d6ef14eff.png">
2. Default selected option "None" means that the group alerts by is
turned off and none of the field is selected. In 8.7 feature has a
**technical preview** badge on the right of the select option.
<img width="373" alt="Screenshot 2023-01-28 at 2 21 24 PM"
src="https://user-images.githubusercontent.com/55110838/215293745-ae232e12-eb92-4429-a667-7b76a2be8c61.png">
3. The default fields options list is different for Alerts and Rule
Details pages and relevant to the page context:
<img width="1555" alt="Screenshot 2023-01-28 at 2 30 02 PM"
src="https://user-images.githubusercontent.com/55110838/215294128-a0e2a875-088b-446e-ba96-28bcb1d114d0.png">
<img width="1498" alt="Screenshot 2023-01-28 at 2 31 22 PM"
src="https://user-images.githubusercontent.com/55110838/215294132-0ca11882-73e9-446c-9e75-112569b9bdc7.png">

4. Group by custom field is a separate option which allows to group the
alerts data by any other index field.
<img width="980" alt="Screenshot 2023-01-28 at 2 34 28 PM"
src="https://user-images.githubusercontent.com/55110838/215294168-f787093c-72e9-483d-8881-70320b1f4343.png">

5. Custom field provides a limited to the field value only default
rendering for the panel and default set of stats metrics: Rules count
and Alerts count.
<img width="1209" alt="Screenshot 2023-01-28 at 2 35 47 PM"
src="https://user-images.githubusercontent.com/55110838/215294237-17c6105c-d9a3-4ced-be2b-c17ffd181e14.png">
For rule name for example the is also additionally rendered metrics,
rule name, rule description and rule tags:
<img width="1899" alt="Screenshot 2023-01-28 at 2 40 02 PM"
src="https://user-images.githubusercontent.com/55110838/215294351-8935ee93-c416-4357-80cd-ce28c0127993.png">

6. Each group panel provides the list of bulk actions options which
could be applied to the whole group by clicking on the **Take actions**
button. For now the list is limited to the three available actions:
<img width="1557" alt="Screenshot 2023-01-28 at 2 32 24 PM"
src="https://user-images.githubusercontent.com/55110838/215294393-513dc001-be83-4f76-ac09-3a36b2b89e00.png">

7. Existing technical preview functionality is limited to display only
one expanded group at a time.
8. For a big number of groups there is a paging functionality with the
ability to define the items per page:
<img width="735" alt="Screenshot 2023-01-28 at 2 32 40 PM"
src="https://user-images.githubusercontent.com/55110838/215294444-98dfef11-b6b5-413b-b82f-0dcea90f0e65.png">
9. Grouping setting is stored in the local storage for each page
separately and after the hard refresh should be picked up and rendered
on the page.

---------

Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@michaelolo24 michaelolo24 added release_note:feature Makes this part of the condensed release notes and removed release_note:skip Skip the PR/issue when compiling release notes labels Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:cloud-deploy Create or update a Cloud deployment release_note:feature Makes this part of the condensed release notes Team:Threat Hunting Security Solution Threat Hunting Team v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants