-
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] Transforms: Adds a link to discover from the transform list to the actions menu. #97805
[ML] Transforms: Adds a link to discover from the transform list to the actions menu. #97805
Conversation
97e7a2e
to
7882f2c
Compare
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.
I think that the changes in src/core/public/saved_objects/saved_objects_service.mock.ts
are not needed.
@@ -16,7 +16,7 @@ const createStartContractMock = () => { | |||
bulkUpdate: jest.fn(), | |||
delete: jest.fn(), | |||
bulkGet: jest.fn(), | |||
find: jest.fn(), | |||
find: jest.fn().mockResolvedValue({ savedObjects: [] }), |
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 you mind setting the mock if needed on your own tests?
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 refactored the code to apply that mock in the transform plugin code (171a65c)
export function getDiscoverUrl(indexPatternId: string, baseUrl: string): string { | ||
return `${baseUrl}/app/discover#?${getDiscoverUrlState(indexPatternId)}`; | ||
} |
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.
discover plugin provides a URL generator
export class DiscoverUrlGenerator |
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 find, we hadn't used those generators yet in the transform plugin. I refactored to make use of it, the result is that these utils are not necessary anymore 🥳 - related update in bb30f3f.
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 see functional test coming as part of this PR 🎉
Just left a few suggestions.
...public/app/sections/transform_management/components/action_discover/discover_action_name.tsx
Outdated
Show resolved
Hide resolved
const action: TransformListAction = useMemo( | ||
() => ({ | ||
name: (item: TransformListRow) => <DiscoverActionName items={[item]} />, | ||
enabled: (item: TransformListRow) => { |
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.
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.
EUI's app icons don't support a disabled state yet. As discussed I changed it to use the visTable
icon instead (189cbb2).
Created an issue in EUI here: elastic/eui#4755
.../public/app/sections/transform_management/components/action_discover/use_action_discover.tsx
Outdated
Show resolved
Hide resolved
.../public/app/sections/transform_management/components/action_discover/use_action_discover.tsx
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 latest changes 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.
No-longer touching anything on the Core side. LGTM :)
Thanks for doing the changes @walterra
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
[ML] Fix assertion. Co-authored-by: Robert Oskamp <[email protected]>
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.
Functional tests LGTM
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @walterra |
…he actions menu. (elastic#97805) Adds a link to discover from the transform list to the actions menu. Conditions for the link to be enabled: - Kibana index pattern must be available - Transform must have been started once and done some progress so there's the destination index available
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…he actions menu. (#97805) (#98491) Adds a link to discover from the transform list to the actions menu. Conditions for the link to be enabled: - Kibana index pattern must be available - Transform must have been started once and done some progress so there's the destination index available Co-authored-by: Walter Rafelsberger <[email protected]>
Summary
Adds a link to discover from the transform list to the actions menu.
Conditions for the link to be enabled:
Checklist
Delete any items that are not applicable to this PR.
For maintainers