-
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] DF Analytics / Transforms: Fix job row actions menu invalid DOM nesting warning #74499
Merged
walterra
merged 45 commits into
elastic:master
from
walterra:ml-fix-list-action-buttons-3
Aug 19, 2020
Merged
Changes from 38 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
56f847d
eui to 27.1.0
thompsongl 6e88169
eui to 27.2.0
thompsongl 4d1fb82
buttoniconside type
thompsongl 006b6fd
euiselectable type
thompsongl 1bb3fa0
update onScroll callback and polyfill size references
thompsongl d97395c
findTestSubject ts
thompsongl 9aa61d4
buttoncontent and collapsiblenav src snapshot updates
thompsongl 5ccbd18
update prop retrieval
thompsongl 810d4c1
xpack snapshots
thompsongl 8cb46b5
jest updates
thompsongl 92e92e5
Merge branch 'master' into eui/27
thompsongl e254e4c
Merge branch 'master' into eui/27
thompsongl d91ca43
type fixes
thompsongl 5d20471
Merge branch 'master' into eui/27
thompsongl 5bfcae2
more snapshots
thompsongl 74ba69d
Merge branch 'master' into eui/27
thompsongl b9ba0b1
virtual list changes
thompsongl a17cc17
more virtualization changes
thompsongl 3912ad2
Merge branch 'master' into eui/27
thompsongl 2537aa9
merge
thompsongl b1d6710
Merge branch 'master' into eui/27
thompsongl 79cc7fe
fix functional tests
thompsongl 9b644b2
Merge branch 'master' into eui/27
thompsongl 5b72e28
Merge branch 'master' into eui/27
thompsongl 2f84eed
data-test-subj for indexPatter-switcher
thompsongl 954e63c
Merge branch 'master' into eui/27
thompsongl 2791b0c
storyshots
thompsongl 6b92ad9
eui to 27.3.1
thompsongl 735fb2e
Merge branch 'master' into eui/27
thompsongl c03ea3a
Merge branch 'master' into eui/27
thompsongl fc51e0a
Merge branch 'master' into ml-fix-list-action-buttons-3
walterra 760e4b7
[ML] Fix nested button issue for transforms list.
walterra fe5ede2
[ML] Fix nested button issue for analytics list.
walterra 65a4091
Merge branch 'master' into ml-fix-list-action-buttons-3
walterra e76996a
[ML] transform components naming fixed.
walterra dc8b6e5
[ML] Fix translations.
walterra ab1de2e
[ML] Fix transform bulk actions. Fixes imports.
walterra aaa9273
[ML] Analytics list action renaming.
walterra 269c223
Merge branch 'master' into ml-fix-list-action-buttons-3
walterra 74071d9
[ML] Fix comment typo.
walterra c9fc1b2
[ML] Consolidate button icons.
walterra 3158d8d
[ML] Fix imports and types.
walterra f440ff5
[ML] Fix translations.
walterra a54d94f
[ML] Change icons for view-series and SMV-button to visLine.
walterra 274e106
[ML] Remove obsolete comment.
walterra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...a_frame_analytics/pages/analytics_management/components/action_clone/use_clone_action.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { useCallback, useMemo } from 'react'; | ||
|
||
import { DataFrameAnalyticsListAction, DataFrameAnalyticsListRow } from '../analytics_list/common'; | ||
|
||
import { | ||
cloneActionNameText, | ||
useNavigateToWizardWithClonedJob, | ||
CloneActionName, | ||
} from './clone_action_name'; | ||
|
||
export type CloneAction = ReturnType<typeof useCloneAction>; | ||
export const useCloneAction = (canCreateDataFrameAnalytics: boolean) => { | ||
const navigateToWizardWithClonedJob = useNavigateToWizardWithClonedJob(); | ||
|
||
const clickHandler = useCallback((item: DataFrameAnalyticsListRow) => { | ||
navigateToWizardWithClonedJob(item); | ||
}, []); | ||
|
||
const action: DataFrameAnalyticsListAction = useMemo( | ||
() => ({ | ||
name: (item: DataFrameAnalyticsListRow) => ( | ||
<CloneActionName isDisabled={!canCreateDataFrameAnalytics} /> | ||
), | ||
enabled: () => canCreateDataFrameAnalytics, | ||
description: cloneActionNameText, | ||
icon: 'copy', | ||
type: 'icon', | ||
onClick: clickHandler, | ||
'data-test-subj': 'mlAnalyticsJobCloneButton', | ||
}), | ||
[] | ||
); | ||
|
||
return { action }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
we probably don't need this comment anymore