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

Update anomalies tab to display the same quantity of anomalies when navigating from entity analytics page #139910

Merged
merged 12 commits into from
Sep 7, 2022

Conversation

machadoum
Copy link
Member

@machadoum machadoum commented Sep 1, 2022

Summary

Anomalies tab shows the most critical anomalies for a User/Host/Network per hour or day.

When users navigate from the Entity analytics page to the Anomalies tab, we have to ensure they will see the same number of anomalies displayed on the Entity Analytics page. For that, I had to add two fields to the tab.

  1. Job id filter
  2. Interval (copied from anomaly explorer)
    When the user clicks on the number of anomalies for a job id, I preselect the job id and preselect interval as 'show all'.

Screenshot 2022-09-01 at 13 46 14

Screenshot 2022-09-01 at 13 44 53

Sep-01-2022 13-49-44

Checklist

Delete any items that are not applicable to this PR.

@machadoum machadoum force-pushed the analytics-dashboard-3 branch from d5864f8 to a7b5d48 Compare September 1, 2022 12:11
@machadoum machadoum force-pushed the analytics-dashboard-3 branch from 99982de to 528f727 Compare September 5, 2022 09:45
@machadoum machadoum force-pushed the analytics-dashboard-3 branch from 528f727 to 7c9c0d3 Compare September 5, 2022 11:12
@machadoum machadoum marked this pull request as ready for review September 5, 2022 11:14
@machadoum machadoum requested review from a team as code owners September 5, 2022 11:14
@machadoum machadoum self-assigned this Sep 5, 2022
@machadoum machadoum 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 Sep 5, 2022
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@machadoum machadoum added v8.5.0 release_note:feature Makes this part of the condensed release notes labels Sep 5, 2022
defaultMessage: 'Job',
});

export const INTERVAL_TOOLTIP = i18n.translate('xpack.securitySolution.ml.table.intervalTooltip', {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite understand the auto option in the interval 😅 maybe we could explain it here. Has this text been agreed with @paulewing?

Copy link
Member Author

Choose a reason for hiding this comment

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

I copied this feature from the ML module.
Screenshot 2022-09-05 at 17 23 30

Copy link
Contributor

@semd semd Sep 5, 2022

Choose a reason for hiding this comment

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

Okay, it is good to have consistency. It's just that what the auto option does is not explained, maybe in the ML context is more intuitive. I don't know, just curious.

Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

When I checked the code I was confused about the use of redux state for the anomalies table filters, later I realized it is needed to set the filters from the entities page, before navigating to the specific anomalies pages. It would be nice to mention that in the description.

I left some NITs and I think we should also wait for Paul's approval (or some designer).
But the code overall LGTM! Tested locally as well.
Great jobId! 🎉

@machadoum
Copy link
Member Author

I was confused about the use of redux state for the anomalies table filters, later I realized it is needed to set the filters from the entities page, before navigating to the specific anomalies pages. It would be nice to mention that in the description.

@semd That is not the only reason why I saved the user selection in the redux store. Most tables on User/Host/Network pages also save the user selection inside the redux store. I guess the reason for that is to preserve the selection while navigating between tabs. But there are many inconsistencies.

For example, here is the initial data stored inside host tabs.

@machadoum machadoum enabled auto-merge (squash) September 7, 2022 08:30
@machadoum
Copy link
Member Author

@elasticmachine merge upstream

@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 6.4MB 6.4MB +15.6KB

History

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

cc @machadoum

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! I also need to check the codeowners because I don't think we should have been pinged on most of these

@machadoum machadoum merged commit 8016007 into elastic:main Sep 7, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 7, 2022
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 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:Explore Team:Threat Hunting Security Solution Threat Hunting Team v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants