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] Fix empty fields and tab titles on Alerts page charts #152402

Merged
merged 4 commits into from Mar 6, 2023

Conversation

christineweng
Copy link
Contributor

@christineweng christineweng commented Feb 28, 2023

Summary

This PR contains fixes/enhancements on charts section on Alerts Page:

  1. Updated tab names

image

  1. Updated inspect modal titles to match actual tab name (from [Security Solution]Alerts Charts name not matching in inspect modal Title #151842)

    • Counts (used to be Aggregations on alerts page and Table in inspect modal, they are both Counts now)
      image
  2. Updated querySkip in Trend, Counts, and Summary as mentioned on [Security Solution] Alerts page KPI visualizations handle querySkip and toggleStatus at panel level #150382

    • querySkip followed the same pattern of toggleStatus that each chart keeps track of its own querySkip based on toggle status (skip query if charts is collapsed). This is no longer necessary because toggle is now managed at a higher level.
  3. Fixed a bug that the top alerts chart was calculating percentages based on available fields

    • For instance, there are 100 alerts, 20 has host.name="host-1", 30 has host.name="host-2", the bars will show 40% and 60% for each, and it adds up to 100%. This does not factor in the 50 alerts with empty/null fields.
    • This PR added an info button that shows the percentage of available fields, as well as on-click action to add a filter to show alerts with empty fields

image

Screen.Recording.2023-02-28.at.12.29.25.PM.mov

Checklist

Delete any items that are not applicable to this PR.

@christineweng christineweng self-assigned this Feb 28, 2023
@christineweng christineweng added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team v8.7.0 v8.8.0 labels Feb 28, 2023
@christineweng christineweng marked this pull request as ready for review March 1, 2023 00:34
@christineweng christineweng requested review from a team as code owners March 1, 2023 00:34
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@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 Mar 1, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
securitySolution 15.7MB 15.7MB +1.5KB
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 428 430 +2

Total ESLint disabled count

id before after diff
securitySolution 506 508 +2

History

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

cc @christineweng

Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

LGTM!

@christineweng christineweng merged commit 012ec79 into elastic:main Mar 6, 2023
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.7 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 152402

Questions ?

Please refer to the Backport tool documentation

christineweng added a commit to christineweng/kibana that referenced this pull request Mar 6, 2023
…arts (elastic#152402)

This PR contains fixes/enhancements on charts section on Alerts Page:

1. Updated tab names

![image](https://user-images.githubusercontent.com/18648970/222000232-e8681a19-3986-4b7a-a7f1-e92b805ad965.png)

2. Updated inspect modal titles to match actual tab name (from
elastic#151842)

- `Counts` (used to be `Aggregations` on alerts page and `Table` in
inspect modal, they are both `Counts` now)

![image](https://user-images.githubusercontent.com/18648970/222000544-575b33ee-dddd-4e8b-b7f6-8bc2b2c67545.png)

3. Updated `querySkip` in `Trend`, `Counts`, and `Summary` as mentioned
on elastic#150382
- `querySkip` followed the same pattern of `toggleStatus` that each
chart keeps track of its own `querySkip` based on toggle status (skip
query if charts is collapsed). This is no longer necessary because
toggle is now managed at a higher level.

4. Fixed a bug that the top alerts chart was calculating percentages
based on available fields
- For instance, there are 100 alerts, 20 has `host.name="host-1"`, 30
has `host.name="host-2"`, the bars will show 40% and 60% for each, and
it adds up to 100%. This does not factor in the 50 alerts with
empty/null fields.
- This PR added an info button that shows the percentage of available
fields, as well as on-click action to add a filter to show alerts with
empty fields

![image](https://user-images.githubusercontent.com/18648970/222000280-456b435e-193c-45e2-b4a6-9b6cf4cfee08.png)

https://user-images.githubusercontent.com/18648970/222000307-764b1e90-ac88-40c7-9f26-a9372e8592a8.mov

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

(cherry picked from commit 012ec79)
christineweng added a commit to christineweng/kibana that referenced this pull request Mar 6, 2023
…arts (elastic#152402)

## Summary

This PR contains fixes/enhancements on charts section on Alerts Page:

1. Updated tab names

![image](https://user-images.githubusercontent.com/18648970/222000232-e8681a19-3986-4b7a-a7f1-e92b805ad965.png)

2. Updated inspect modal titles to match actual tab name (from
elastic#151842)

- `Counts` (used to be `Aggregations` on alerts page and `Table` in
inspect modal, they are both `Counts` now)

![image](https://user-images.githubusercontent.com/18648970/222000544-575b33ee-dddd-4e8b-b7f6-8bc2b2c67545.png)

3. Updated `querySkip` in `Trend`, `Counts`, and `Summary` as mentioned
on elastic#150382
- `querySkip` followed the same pattern of `toggleStatus` that each
chart keeps track of its own `querySkip` based on toggle status (skip
query if charts is collapsed). This is no longer necessary because
toggle is now managed at a higher level.

4. Fixed a bug that the top alerts chart was calculating percentages
based on available fields
- For instance, there are 100 alerts, 20 has `host.name="host-1"`, 30
has `host.name="host-2"`, the bars will show 40% and 60% for each, and
it adds up to 100%. This does not factor in the 50 alerts with
empty/null fields.
- This PR added an info button that shows the percentage of available
fields, as well as on-click action to add a filter to show alerts with
empty fields

![image](https://user-images.githubusercontent.com/18648970/222000280-456b435e-193c-45e2-b4a6-9b6cf4cfee08.png)

https://user-images.githubusercontent.com/18648970/222000307-764b1e90-ac88-40c7-9f26-a9372e8592a8.mov

### 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

(cherry picked from commit 012ec79)

# Conflicts:
#	x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx
@christineweng
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.7

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

christineweng added a commit that referenced this pull request Mar 7, 2023
…age charts (#152402) (#152769)

# Backport

This will backport the following commits from `main` to `8.7`:
- [[Security Solution] Fix empty fields and tab titles on Alerts page
charts (#152402)](#152402)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"christineweng","email":"18648970+christineweng@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-03-06T22:44:57Z","message":"[Security
Solution] Fix empty fields and tab titles on Alerts page charts
(#152402)\n\n## Summary\r\n\r\nThis PR contains fixes/enhancements on
charts section on Alerts Page:\r\n\r\n1. Updated tab
names\r\n\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000232-e8681a19-3986-4b7a-a7f1-e92b805ad965.png)\r\n
\r\n\r\n2. Updated inspect modal titles to match actual tab name
(from\r\nhttps://github.com//issues/151842)\r\n\r\n-
`Counts` (used to be `Aggregations` on alerts page and `Table`
in\r\ninspect modal, they are both `Counts`
now)\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000544-575b33ee-dddd-4e8b-b7f6-8bc2b2c67545.png)\r\n\r\n3.
Updated `querySkip` in `Trend`, `Counts`, and `Summary` as
mentioned\r\non #150382
`querySkip` followed the same pattern of `toggleStatus` that
each\r\nchart keeps track of its own `querySkip` based on toggle status
(skip\r\nquery if charts is collapsed). This is no longer necessary
because\r\ntoggle is now managed at a higher level.\r\n \r\n4. Fixed a
bug that the top alerts chart was calculating percentages\r\nbased on
available fields\r\n- For instance, there are 100 alerts, 20 has
`host.name=\"host-1\"`, 30\r\nhas `host.name=\"host-2\"`, the bars will
show 40% and 60% for each, and\r\nit adds up to 100%. This does not
factor in the 50 alerts with\r\nempty/null fields.\r\n- This PR added an
info button that shows the percentage of available\r\nfields, as well as
on-click action to add a filter to show alerts with\r\nempty fields\r\n
\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000280-456b435e-193c-45e2-b4a6-9b6cf4cfee08.png)\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/222000307-764b1e90-ac88-40c7-9f26-a9372e8592a8.mov\r\n\r\n\r\n
\r\n### Checklist\r\n\r\nDelete any items that are not applicable to
this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"012ec798f7c9b512478b55aec2dc686a37c8347c","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Threat
Hunting","Team: SecuritySolution","release_note:feature","Team:Threat
Hunting:Investigations","v8.7.0","v8.8.0"],"number":152402,"url":"#152402
Solution] Fix empty fields and tab titles on Alerts page charts
(#152402)\n\n## Summary\r\n\r\nThis PR contains fixes/enhancements on
charts section on Alerts Page:\r\n\r\n1. Updated tab
names\r\n\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000232-e8681a19-3986-4b7a-a7f1-e92b805ad965.png)\r\n
\r\n\r\n2. Updated inspect modal titles to match actual tab name
(from\r\nhttps://github.com//issues/151842)\r\n\r\n-
`Counts` (used to be `Aggregations` on alerts page and `Table`
in\r\ninspect modal, they are both `Counts`
now)\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000544-575b33ee-dddd-4e8b-b7f6-8bc2b2c67545.png)\r\n\r\n3.
Updated `querySkip` in `Trend`, `Counts`, and `Summary` as
mentioned\r\non #150382
`querySkip` followed the same pattern of `toggleStatus` that
each\r\nchart keeps track of its own `querySkip` based on toggle status
(skip\r\nquery if charts is collapsed). This is no longer necessary
because\r\ntoggle is now managed at a higher level.\r\n \r\n4. Fixed a
bug that the top alerts chart was calculating percentages\r\nbased on
available fields\r\n- For instance, there are 100 alerts, 20 has
`host.name=\"host-1\"`, 30\r\nhas `host.name=\"host-2\"`, the bars will
show 40% and 60% for each, and\r\nit adds up to 100%. This does not
factor in the 50 alerts with\r\nempty/null fields.\r\n- This PR added an
info button that shows the percentage of available\r\nfields, as well as
on-click action to add a filter to show alerts with\r\nempty fields\r\n
\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000280-456b435e-193c-45e2-b4a6-9b6cf4cfee08.png)\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/222000307-764b1e90-ac88-40c7-9f26-a9372e8592a8.mov\r\n\r\n\r\n
\r\n### Checklist\r\n\r\nDelete any items that are not applicable to
this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"012ec798f7c9b512478b55aec2dc686a37c8347c"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"#152402
Solution] Fix empty fields and tab titles on Alerts page charts
(#152402)\n\n## Summary\r\n\r\nThis PR contains fixes/enhancements on
charts section on Alerts Page:\r\n\r\n1. Updated tab
names\r\n\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000232-e8681a19-3986-4b7a-a7f1-e92b805ad965.png)\r\n
\r\n\r\n2. Updated inspect modal titles to match actual tab name
(from\r\nhttps://github.com//issues/151842)\r\n\r\n-
`Counts` (used to be `Aggregations` on alerts page and `Table`
in\r\ninspect modal, they are both `Counts`
now)\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000544-575b33ee-dddd-4e8b-b7f6-8bc2b2c67545.png)\r\n\r\n3.
Updated `querySkip` in `Trend`, `Counts`, and `Summary` as
mentioned\r\non #150382
`querySkip` followed the same pattern of `toggleStatus` that
each\r\nchart keeps track of its own `querySkip` based on toggle status
(skip\r\nquery if charts is collapsed). This is no longer necessary
because\r\ntoggle is now managed at a higher level.\r\n \r\n4. Fixed a
bug that the top alerts chart was calculating percentages\r\nbased on
available fields\r\n- For instance, there are 100 alerts, 20 has
`host.name=\"host-1\"`, 30\r\nhas `host.name=\"host-2\"`, the bars will
show 40% and 60% for each, and\r\nit adds up to 100%. This does not
factor in the 50 alerts with\r\nempty/null fields.\r\n- This PR added an
info button that shows the percentage of available\r\nfields, as well as
on-click action to add a filter to show alerts with\r\nempty fields\r\n
\r\n\r\n![image](https://user-images.githubusercontent.com/18648970/222000280-456b435e-193c-45e2-b4a6-9b6cf4cfee08.png)\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/222000307-764b1e90-ac88-40c7-9f26-a9372e8592a8.mov\r\n\r\n\r\n
\r\n### Checklist\r\n\r\nDelete any items that are not applicable to
this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"012ec798f7c9b512478b55aec2dc686a37c8347c"}}]}]
BACKPORT-->
sloanelybutsurely pushed a commit to sloanelybutsurely/kibana that referenced this pull request Mar 8, 2023
…arts (elastic#152402)

## Summary

This PR contains fixes/enhancements on charts section on Alerts Page:

1. Updated tab names



![image](https://user-images.githubusercontent.com/18648970/222000232-e8681a19-3986-4b7a-a7f1-e92b805ad965.png)
 

2. Updated inspect modal titles to match actual tab name (from
elastic#151842)

- `Counts` (used to be `Aggregations` on alerts page and `Table` in
inspect modal, they are both `Counts` now)

![image](https://user-images.githubusercontent.com/18648970/222000544-575b33ee-dddd-4e8b-b7f6-8bc2b2c67545.png)

3. Updated `querySkip` in `Trend`, `Counts`, and `Summary` as mentioned
on elastic#150382
- `querySkip` followed the same pattern of `toggleStatus` that each
chart keeps track of its own `querySkip` based on toggle status (skip
query if charts is collapsed). This is no longer necessary because
toggle is now managed at a higher level.
 
4. Fixed a bug that the top alerts chart was calculating percentages
based on available fields
- For instance, there are 100 alerts, 20 has `host.name="host-1"`, 30
has `host.name="host-2"`, the bars will show 40% and 60% for each, and
it adds up to 100%. This does not factor in the 50 alerts with
empty/null fields.
- This PR added an info button that shows the percentage of available
fields, as well as on-click action to add a filter to show alerts with
empty fields
  

![image](https://user-images.githubusercontent.com/18648970/222000280-456b435e-193c-45e2-b4a6-9b6cf4cfee08.png)


https://user-images.githubusercontent.com/18648970/222000307-764b1e90-ac88-40c7-9f26-a9372e8592a8.mov


 
### 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
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this pull request Mar 10, 2023
…arts (elastic#152402)

## Summary

This PR contains fixes/enhancements on charts section on Alerts Page:

1. Updated tab names



![image](https://user-images.githubusercontent.com/18648970/222000232-e8681a19-3986-4b7a-a7f1-e92b805ad965.png)
 

2. Updated inspect modal titles to match actual tab name (from
elastic#151842)

- `Counts` (used to be `Aggregations` on alerts page and `Table` in
inspect modal, they are both `Counts` now)

![image](https://user-images.githubusercontent.com/18648970/222000544-575b33ee-dddd-4e8b-b7f6-8bc2b2c67545.png)

3. Updated `querySkip` in `Trend`, `Counts`, and `Summary` as mentioned
on elastic#150382
- `querySkip` followed the same pattern of `toggleStatus` that each
chart keeps track of its own `querySkip` based on toggle status (skip
query if charts is collapsed). This is no longer necessary because
toggle is now managed at a higher level.
 
4. Fixed a bug that the top alerts chart was calculating percentages
based on available fields
- For instance, there are 100 alerts, 20 has `host.name="host-1"`, 30
has `host.name="host-2"`, the bars will show 40% and 60% for each, and
it adds up to 100%. This does not factor in the 50 alerts with
empty/null fields.
- This PR added an info button that shows the percentage of available
fields, as well as on-click action to add a filter to show alerts with
empty fields
  

![image](https://user-images.githubusercontent.com/18648970/222000280-456b435e-193c-45e2-b4a6-9b6cf4cfee08.png)


https://user-images.githubusercontent.com/18648970/222000307-764b1e90-ac88-40c7-9f26-a9372e8592a8.mov


 
### 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
nkhristinin pushed a commit that referenced this pull request Mar 22, 2023
…arts (#152402)

## Summary

This PR contains fixes/enhancements on charts section on Alerts Page:

1. Updated tab names



![image](https://user-images.githubusercontent.com/18648970/222000232-e8681a19-3986-4b7a-a7f1-e92b805ad965.png)
 

2. Updated inspect modal titles to match actual tab name (from
#151842)

- `Counts` (used to be `Aggregations` on alerts page and `Table` in
inspect modal, they are both `Counts` now)

![image](https://user-images.githubusercontent.com/18648970/222000544-575b33ee-dddd-4e8b-b7f6-8bc2b2c67545.png)

3. Updated `querySkip` in `Trend`, `Counts`, and `Summary` as mentioned
on #150382
- `querySkip` followed the same pattern of `toggleStatus` that each
chart keeps track of its own `querySkip` based on toggle status (skip
query if charts is collapsed). This is no longer necessary because
toggle is now managed at a higher level.
 
4. Fixed a bug that the top alerts chart was calculating percentages
based on available fields
- For instance, there are 100 alerts, 20 has `host.name="host-1"`, 30
has `host.name="host-2"`, the bars will show 40% and 60% for each, and
it adds up to 100%. This does not factor in the 50 alerts with
empty/null fields.
- This PR added an info button that shows the percentage of available
fields, as well as on-click action to add a filter to show alerts with
empty fields
  

![image](https://user-images.githubusercontent.com/18648970/222000280-456b435e-193c-45e2-b4a6-9b6cf4cfee08.png)


https://user-images.githubusercontent.com/18648970/222000307-764b1e90-ac88-40c7-9f26-a9372e8592a8.mov


 
### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:feature Makes this part of the condensed release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team Team:Threat Hunting Security Solution Threat Hunting Team v8.7.0 v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants