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

[ML] Data Frame Analytics/Anomaly Detection: Custom URLs - entity dropdown reflects Data View update #155096

Merged

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Apr 17, 2023

Summary

Related meta issue: #150375

This PR ensures that when data view is changed, the query entity dropdown values update to reflect the fields for the newly chosen data view. This makes it easier for example to build a link to Discover to view documents in a data view which contains useful contextual data, and has fields of the same name as those used in the job but which was not used to create the job e.g. data views which share a common host.name field.

image

Checklist

@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner April 17, 2023 21:26
@alvarezmelissa87 alvarezmelissa87 self-assigned this Apr 17, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

LGTM, just a note on a potential simplification for the context mock.

@@ -9,13 +9,26 @@
import { shallow } from 'enzyme';

jest.mock('../../../services/job_service', () => 'mlJobService');
jest.mock('../../../contexts/kibana', () => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a mock for this whole file in x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts so I wonder if just jest.mock('../../../contexts/kibana'); would work here?

@alvarezmelissa87
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
ml 1728 1729 +1

Async chunks

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

id before after diff
ml 3.4MB 3.4MB +70.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 394 397 +3

Total ESLint disabled count

id before after diff
securitySolution 474 477 +3

History

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

cc @alvarezmelissa87

@alvarezmelissa87 alvarezmelissa87 merged commit d6aba14 into elastic:main Apr 20, 2023
@alvarezmelissa87 alvarezmelissa87 deleted the ml-dfa-custom-url-improvement branch April 20, 2023 19:07
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Apr 20, 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 Feature:Anomaly Detection ML anomaly detection Feature:Data Frame Analytics ML data frame analytics features :ml release_note:fix v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants