elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.35k stars 7.98k forks source link

[ML] Single Metric Viewer embeddable in dashboards: move all config to flyout #182756

Closed alvarezmelissa87 closed 4 days ago

alvarezmelissa87 commented 1 week ago

Summary

Part of https://github.com/elastic/kibana/issues/182042 This PR also fixes the issue in the swimlane embeddable that fails to close the flyout if navigating into the main dashboards page.

Related meta issue: https://github.com/elastic/kibana/issues/181272 Item: https://github.com/elastic/kibana/issues/181272

image

Checklist

Delete any items that are not applicable to this PR.

elasticmachine commented 1 week ago

Pinging @elastic/ml-ui (:ml)

peteharverson commented 1 week ago

Testing this I also found an issue when changing the selected job (also happens on main). I think this occurs when switching from a job with 1 detector to one with multiple detectors and selecting the detector at an index which doesn't exist in the first job. Here I select a job with 2 detectors and pick the second detector.

Looks like buildConfigFromDetector in chart_config_builder.ts is called several times, and at one point is passed the config for the previously selected job but the detector index from the new selection:

https://github.com/elastic/kibana/assets/7405507/bad74cb0-bb47-43bc-b7fa-cb495aa149aa

alvarezmelissa87 commented 1 week ago

Created a separate PR for the fix for the issue you found, @peteharverson so we can backport to 8.14. 👍

alvarezmelissa87 commented 1 week ago

This is ready for another look when you get a chance cc @darnautov, @peteharverson

alvarezmelissa87 commented 1 week ago

@elasticmachine merge upstream

alvarezmelissa87 commented 4 days ago

@elasticmachine merge upstream

kibanamachine commented 4 days ago

merge conflict between base and head

kibana-ci commented 4 days ago

:yellow_heart: Build succeeded, but was flaky

Failed CI Steps

Test Failures

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
ml 2013 2012 -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 4.2MB 4.2MB +519.0B

Page load bundle

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

id before after diff
ml 77.0KB 77.0KB -2.0B
Unknown metric groups #### async chunk count | id | [before](https://github.com/elastic/kibana/commit/382ee2d076aa603c28e5649c1b3e7eb1ea3b5d8c) | [after](https://github.com/elastic/kibana/commit/7603fd4b17fff9107d2d8a2ceb04547a7bcd46ac) | diff | | --- | --- | --- | --- | | `ml` | 98 | 99 | +1 |

History

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

cc @alvarezmelissa87