[ML] Fix saving of custom URLs for job created in Advanced page#21207
Merged
peteharverson merged 2 commits intoelastic:masterfrom Jul 26, 2018
Merged
[ML] Fix saving of custom URLs for job created in Advanced page#21207peteharverson merged 2 commits intoelastic:masterfrom
peteharverson merged 2 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/ml-ui |
Contributor
💚 Build Succeeded |
jgowdyelastic
approved these changes
Jul 25, 2018
Member
jgowdyelastic
left a comment
There was a problem hiding this comment.
Generally LGTM, i suggested a simplification for the settings checks.
|
|
||
| if (newJobData && newJobData.customUrls) { | ||
| if (settingsData.custom_settings === undefined) { | ||
| settingsData.custom_settings = {}; |
Member
There was a problem hiding this comment.
rather than having the previous check for job.custom_setting and then this check for settingsData.custom_settings they could both be replaced with a single check here:
settingsData.custom_settings = job.custom_settings || {};
or
settingsData.custom_settings = (job.custom_settings !== undefined) ? job.custom_settings : {};
Contributor
💚 Build Succeeded |
peteharverson
added a commit
to peteharverson/kibana
that referenced
this pull request
Jul 26, 2018
…tic#21207) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
peteharverson
added a commit
to peteharverson/kibana
that referenced
this pull request
Jul 26, 2018
…tic#21207) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
sorenlouv
pushed a commit
to sorenlouv/kibana
that referenced
this pull request
Jul 26, 2018
…tic#21207) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
peteharverson
added a commit
that referenced
this pull request
Jul 26, 2018
…) (#21259) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
peteharverson
pushed a commit
that referenced
this pull request
Jul 26, 2018
…) (#21261) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
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.
Fixes an issue where custom URLs added to a job created in the Advanced job page were not being saved. Bug introduced by edits in #21094.
Also removes the
created_byproperty undercustom_settingsif the job has custom URLs defined, as these will not be editable if the job is cloned via one of the job wizards.