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] Add Anomaly charts embeddables to Dashboard from Anomaly Explorer page #95623

Merged
merged 48 commits into from
Apr 8, 2021

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Mar 29, 2021

Summary

Follow-up of #94396. Part of #94650. This PR adds an option in the anomaly explorer page to add embeddables to Kibana dashboards:

Screen Shot 2021-03-28 at 18 58 13

Screen Shot 2021-03-28 at 18 45 41

2021-03-28 at 18 54

It also:

  • Remove some cached synchronous service like mlJobService
  • Remove side effects like explorerService in the getAnomalyData function which previously was used to set charts data in the explorer page
  • Remove the deprecated resultSelector in the mergeMap util
  • Consolidates the Add to dashboard controls that were also used to add swimlane embeddables to the dashboard.

Checklist

Delete any items that are not applicable to this PR.

@qn895 qn895 self-assigned this Mar 29, 2021
@qn895 qn895 requested review from darnautov, walterra and peteharverson and removed request for darnautov March 29, 2021 00:08
@qn895 qn895 added the :ml label Mar 29, 2021
@@ -7,96 +7,65 @@

import { isRuntimeField, isRuntimeMappings } from './runtime_field_utils';

describe('ML runtime field utils', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect something went wrong with a master rebase/merge. The removed lines are actually the newer code merged as part of this PR: https://github.com/elastic/kibana/pull/95651/files#diff-02075861bae59012670e1e16f2017e22cfca82cf3d7a210eb9c66e96503252d1R10

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated here dbd5e91 (#95623)

(typeof arg.script === 'string' ||
(isPopulatedObject(arg.script, ['source']) &&
(isPopulatedObject(arg.script) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a master rebase/merge went wrong here, the removed code is actually the newer one, see this PR again: https://github.com/elastic/kibana/pull/95651/files#diff-7dfaf266f36a691f0ea87f071af9f1915e031dffb83ad4c35281b932114deb07R16

Copy link
Member Author

@qn895 qn895 Apr 6, 2021

Choose a reason for hiding this comment

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

Thanks for catching that. I have updated it here dbd5e91 (#95623)

@qn895 qn895 requested a review from walterra April 6, 2021 14:14
@qn895
Copy link
Member Author

qn895 commented Apr 6, 2021

@elasticmachine merge upstream

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.

Code LGTM

@qn895
Copy link
Member Author

qn895 commented Apr 7, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
ml 1784 1789 +5

Async chunks

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

id before after diff
ml 5.9MB 6.0MB +9.9KB

Page load bundle

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

id before after diff
ml 66.8KB 66.9KB +138.0B

History

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

cc @qn895

@qn895 qn895 added the auto-backport Deprecated - use backport:version if exact versions are needed label Apr 8, 2021
@qn895 qn895 merged commit d904f8d into elastic:master Apr 8, 2021
@qn895 qn895 deleted the ml-anomaly-embeddable-refactor-ui-actions branch April 8, 2021 17:22
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 8, 2021
…r page (elastic#95623)

Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.x / #96614

This backport PR will be merged automatically after passing CI.

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added backport missing Added to PRs automatically when the are determined to be missing a backport. and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Apr 12, 2021
kibanamachine added a commit that referenced this pull request Apr 12, 2021
…r page (#95623) (#96614)

Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
@qn895 qn895 restored the ml-anomaly-embeddable-refactor-ui-actions branch April 19, 2021 18:08
@qn895 qn895 deleted the ml-anomaly-embeddable-refactor-ui-actions branch May 24, 2021 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Anomaly Detection ML anomaly detection :ml release_note:enhancement v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants