kibana
kibana copied to clipboard
[ML] Quickly create ML jobs from lens visualizations

Checklist
Delete any items that are not applicable to this PR.
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials
- [ ] Unit or functional tests were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)
- [ ] This was checked for cross-browser compatibility
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---|---|---|---|
| Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. |
| Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. |
| See more potential risk examples |
For maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately
Pinging @elastic/ml-ui (:ml)
@elastic/kibana-design you have been pinged because I have deleted a scss file.
Thanks @mdefazio , I've added the visualisation title to the description at the top of the flyout. https://github.com/elastic/kibana/pull/136421/commits/65289fd6599a7aaa80cd597ab9326e5ff6cca180

Regarding the background colour, I copied the style used in Lens:

Changing the colour in my panels does make it standout from the background, but IMO they look a bit too white and strange.

vs the original

Thanks @jgowdyelastic , is there a scenario where you're setting up 2+ jobs?
The one difference between Lens is that the input or area of focus is still on white (@timestamp or Median of CPUtilization is in a white panel over the gray). Granted, because you're including the input field directly in place of the inner panel, it's a bit up in the air as to how to present this. But simply for contrast on the input, the white might be worth it.
@mdefazio
is there a scenario where you're setting up 2+ jobs?
If you have multiple compatible layers in a visualization it would be possible to create multiple jobs from a single flyout. The layer components are independent from each other. It's worth noting, in case there is come confusion here, that the layers themselves are not named. The best I can do is use the layer types as the title (e.g. stacked bar chart) This was raised before in the previous PR https://github.com/elastic/kibana/pull/129762#issuecomment-1129264127 (second half of this comment). It would be better to have a more descriptive title for the layer, but it's not easy, or even possible.
Ok...now it's coming back to me! Thanks for the reminder of the history / context!
:yellow_heart: Build succeeded, but was flaky
- Buildkite Build
- Commit: a2330ffd7f723a7a40e2db1f4529707d75b295b4
Failed CI Steps
Test Failures
- [job] [logs] FTR Configs #27 / a11y tests using flights sample data "after all" hook in "using flights sample data"
- [job] [logs] FTR Configs #27 / a11y tests using flights sample data "before all" hook in "using flights sample data"
Metrics [docs]
Module Count
Fewer modules leads to a faster build time
| id | before | after | diff |
|---|---|---|---|
ml |
1606 | 1605 | -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.3MB | 3.3MB | +9.4KB |
Unknown metric groups
ESLint disabled line counts
| id | before | after | diff |
|---|---|---|---|
ml |
98 | 101 | +3 |
Total ESLint disabled count
| id | before | after | diff |
|---|---|---|---|
ml |
101 | 104 | +3 |
History
- :broken_heart: Build #67590 failed d9fd4b85ca1f77dc98fd3be523b23e64419519a0
- :broken_heart: Build #67522 failed 67064d77d5e9dbab4462acf6a89f657e818fdee2
- :broken_heart: Build #67424 failed 65289fd6599a7aaa80cd597ab9326e5ff6cca180
- :green_heart: Build #67334 succeeded 336db0cd948bdeddc99d02c901e0eb76454e0fc5
- :yellow_heart: Build #67298 was flaky 18fa40e2aef68007086c1237d13dfeb0d3235499
- :green_heart: Build #67156 succeeded 563dc199d70fd59c156864f6878d82f253889f06
To update your PR or re-run it, just comment with:
@elasticmachine merge upstream
cc @jgowdyelastic