-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 Lens and Discover integration to index based Data Visualizer #89471
Conversation
Pinging @elastic/ml-ui (:ml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to have functional tests as part of this PR! 🎉 Left a few comments.
Additionally, we might want to add the new features to the permission tests and would also like to validate some discover and lens page content. I'll take a closer look and report back with more details.
x-pack/test/functional/services/ml/data_visualizer_index_based.ts
Outdated
Show resolved
Hide resolved
x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer_actions_panel.ts
Show resolved
Hide resolved
x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer_actions_panel.ts
Show resolved
Hide resolved
...blic/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts
Outdated
Show resolved
Hide resolved
.../ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Show resolved
Hide resolved
…chart, add boolean chart
…chart, add boolean chart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that when I open Discover in the same browser tab, it correctly applies the selected time range. But opening the Discover link in a new browser tab falls back to Last 15 minutes
. Not sure if this can be fixed on our side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested latest edits - looks good overall. Just one more edit needed for date
field types I think.
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see the added permission tests and the trial / basic license test split!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the extended Discover checks:
We already validate that Discover displays the query as expected. IMO it would be good to also add a second assertion for the hit count of that discover page. That way we can be sure that data is loaded as expected. I've created an example, how this could look like.
For the Lens link validation:
I'd suggest to have a separate test file, because it would interrupt the existing index_data_visualizer
tests badly. I think this would be good to have in a follow-up PR because it will require some additional work.
What do you think @peteharverson ?
Adding the hit count assertion for the Discover drilldown looks like it is worth including in this PR @pheyos. Adding new tests for the Lens link in a follow-up PR is sensible. Would be great to have even some basic validation that expected content is displayed in the Lens page. |
.../ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx
Outdated
Show resolved
Hide resolved
.../ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx
Outdated
Show resolved
Hide resolved
import { CombinedQuery } from '../../../common'; | ||
|
||
export function getActions( | ||
indexPattern: IndexPattern, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be IIndexPattern
interface instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: we should replace all IndexPattern
imports with IIndexPattern
later because otherwise, this class end up in our bundle
...blic/application/datavisualizer/index_based/components/field_data_row/action_menu/actions.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
...c/application/datavisualizer/index_based/components/field_data_row/action_menu/lens_utils.ts
Outdated
Show resolved
Hide resolved
Thanks! Good catch. I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested latest edits for date
fields and the Discover 'open in new tab' behavior, and LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open Discover in new tab works well now for me and the extended Discover checks are looking good! Just one comment around the trial/basic test split:
x-pack/test/functional_basic/apps/ml/data_visualizer/index_data_visualizer_actions_panel.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and functional tests LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
Part of #86387. This PR brings:
Checklist
Delete any items that are not applicable to this PR.