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

[Logs UI] Display category in anomalies table #88677

Merged

Conversation

Kerry350
Copy link
Contributor

Summary

This PR implements #79770.

Screenshot 2021-01-19 at 14 23 03

It reuses the fetchLogEntryCategories function, and then decorates the category anomalies with extra information.

Reviewing

The changeset makes this look quite overwhelming as there's a lot of type cleanup. But the actual functionality changes are contained to 6a1214b and fa4a6cd.

9b220a1 can initially be filtered out for a better view.

(This isn't perfect, as there were a few tweaks to the core functionality to satisfy the type changes, but this should at least help to see the main idea of fetching the category information and rendering it).

Type cleanup

Please see #88051 (comment) and #88051 (comment) for the initial motivation.

I've tried to move HTTP types (those in http_api) away from the UI and server side concerns that aren't routes. The only places directly dealing with the HTTP types should now be service calls, data hooks, and routes. But not things like query generation, libs etc.

I've moved general "entities" into other common locations, which the UI and libs etc can then also use. The HTTP types are then comprised of these more general types.

This was only supposed to be a change for the ML functionality, but due to the log entry examples this did end up creeping somewhat into log entries as well.

Cleanup http types leaking into UI and server side libs
@Kerry350 Kerry350 added release_note:enhancement v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.12.0 labels Jan 19, 2021
@Kerry350 Kerry350 added this to the Logs UI 7.12 milestone Jan 19, 2021
@Kerry350 Kerry350 requested a review from a team January 19, 2021 14:30
@Kerry350 Kerry350 self-assigned this Jan 19, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@Kerry350
Copy link
Contributor Author

@elasticmachine merge upstream

@Kerry350
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@afgomez afgomez left a comment

Choose a reason for hiding this comment

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

Code LGTM! Thanks for all the type organization :)

There are some minor tweaks design wise. With the new content the up/down arrows are misaligned in both desktop and mobile views

On master:
Screenshot 2021-01-26 at 16 01 09
Screenshot 2021-01-26 at 16 01 24

On branch:
Screenshot 2021-01-26 at 16 24 27
Screenshot 2021-01-26 at 16 24 36

@Kerry350
Copy link
Contributor Author

@afgomez Thanks for the review 🙏

I've fixed the alignment. Switched for a centre alignment on the arrow. And sorted the mobile break.

Screenshot 2021-01-27 at 13 14 19
Screenshot 2021-01-27 at 13 14 28

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
infra 1095 1098 +3

Async chunks

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

id before after diff
infra 2.2MB 2.2MB +7.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
infra 160.9KB 161.3KB +454.0B

History

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

Copy link
Contributor

@afgomez afgomez left a comment

Choose a reason for hiding this comment

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

LGTM!

@Kerry350 Kerry350 merged commit 42a9490 into elastic:master Jan 27, 2021
Kerry350 added a commit to Kerry350/kibana that referenced this pull request Jan 27, 2021
* Add category pattern to anomalies table
Kerry350 added a commit that referenced this pull request Jan 28, 2021
* Add category pattern to anomalies table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature release_note:enhancement Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display the ML Category on the details table of the Anomalies tab in the Logs App
4 participants