-
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] Data Frame Analytics results view: add link to custom visualizations for viewing scatterplot charts #149647
[ML] Data Frame Analytics results view: add link to custom visualizations for viewing scatterplot charts #149647
Conversation
Pinging @elastic/ml-ui (:ml) |
index, | ||
body: { | ||
fields: fieldsToFetch, | ||
size: 1000, |
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.
Can we apply the value from the UI dropdown to select the amount of docs to fetch?
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 catch - updated in e14f32f
Really great feature! I tested with different types of jobs and outlier detection and regression seems to work well. With classification somehow the chart doesn't end up fully populated in the Vega editor unfortunately. This is how it looks in the DFA results page: This is how it ends up in the Vega Editor: The data seems to get fully fetched, when I do a drag select it ends up like this: |
<EuiLink | ||
onClick={async () => { | ||
const customVisLink = getCustomVisualizationLink(); | ||
await application.navigateToApp('visualize#', { |
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.
Do we want it opening in a new tab or the same tab? Currently after the Visualize tab opens, the Save and return / Cancel buttons open up Dashboard. If it opens in the same tab, can the Save and return / Cancel buttons return you to the DFA page from which Visualize was opened?
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.
Opening it up in the same tab in e14f32f
As far as the cancel/return buttons - I'm not seeing them - could you share how you're getting them in the custom vis UI view?
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.
This happens only if you add the charts to a dashboard from Visualize. Looks like that action adds this to session storage:
EMBEDDABLE_STATE_TRANSFER: {
"visualize": {
"originatingApp": "dashboards",
"embeddableId": "e14aa766-2fc1-40c1-ac2f-8daeb9fa4c0c",
"searchSessionId": "d95d87ba-8eb0-4034-b23e-57423357f4e2"
}
}
Any subsequent opening of visualize
from the ML DFA pages will then result in the 'Save and return' and 'Cancel' buttons appearing in the header and redirecting to the dashboard rather than ML. Maybe we can set ML as the originating app, or if not, clear that key? Makes sense to address in a follow up.
x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
@walterra - the issue regarding the classification job results not showing up correctly (#149647 (comment)) has been fixed in e14f32f The other updates have been made cc @peteharverson |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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 the latest version and classification charts now get correctly displayed in the Vega editor! Would be great to have a functional test so we can track regressions should anything with the Vega Editor change, but can be done in a follow up.
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 changes and LGTM.
Would be good to fix that return / cancel behavior in a follow up if possible from the ML code.
… link to custom visualization (#150103) ## Summary Follow up to #149647 Link to flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1856 This PR adds a functional test for the scatterplot matrix link in the DFA results view to custom visualizations UI. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…ions for viewing scatterplot charts (elastic#149647) ## Summary This PR adds a link to the custom visualization UI from scatterplot matrix charts in the data frame analytics job wizard and results views. This allows you to view the data and edit the visualization inside the custom visualization editor, and then save it to a dashboard to explore the data alongside other contextual information. <img width="884" alt="image" src="https://user-images.githubusercontent.com/7405507/215125288-9d5527fa-6074-42bd-98f1-2c04cd025432.png"> Related meta issue: elastic#131551 ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) 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](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
This PR adds a link to the custom visualization UI from scatterplot matrix charts in the data frame analytics job wizard and results views. This allows you to view the data and edit the visualization inside the custom visualization editor, and then save it to a dashboard to explore the data alongside other contextual information.
Related meta issue: #131551
Checklist
Delete any items that are not applicable to this PR.