[ML] Converts the custom URL editor to EUI / React#21094
Merged
peteharverson merged 1 commit intoelastic:masterfrom Jul 24, 2018
Merged
[ML] Converts the custom URL editor to EUI / React#21094peteharverson merged 1 commit intoelastic:masterfrom
peteharverson merged 1 commit intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/ml-ui |
|
|
||
|
|
||
| export function getNewCustomUrlDefaults(job, dashboards, indexPatterns) { | ||
| // Returns the settings object in the format used by the custom URL editor |
Member
There was a problem hiding this comment.
nit, we normally put the descriptive comment above the function
| }]; | ||
| } | ||
|
|
||
| function onLabelChange(e, customUrl, setEditCustomUrl) { |
Member
There was a problem hiding this comment.
I think these functions would be better inside CustomUrlEditor and it converted to a class.
Only because you're having to pass setEditCustomUrl in to store the data.
i know we discussed this but i didn't realise the plan was to pass in the function which is called to do the storing the data.
but i'm happy to go with the majority on this.
Contributor
Author
There was a problem hiding this comment.
This is a good candidate for testing out the React Context API, to avoid having to pass down customUrl and setEditCustomUrl several levels through Props. Will plan to check that out in a later PR.
Contributor
💚 Build Succeeded |
peteharverson
added a commit
to peteharverson/kibana
that referenced
this pull request
Jul 24, 2018
peteharverson
added a commit
that referenced
this pull request
Jul 24, 2018
This was referenced Jul 25, 2018
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Converts the custom URL editor, as used in the flyout when editing an ML job, from Angular to EUI / React.
Current Angular based component:

New EUI / React component:

A couple of enhancements are planned for future PRs (expect 6.5) when editing existing custom URLs, to auto expand the URL value field from a text field to a text area on focus, plus extra validation for the fields to disable the edit job flyout save button if for example the URL label or value are blank.