-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Fix saving of custom URLs for job created in Advanced page #21207
[ML] Fix saving of custom URLs for job created in Advanced page #21207
Conversation
Pinging @elastic/ml-ui |
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
💚 Build Succeeded |
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.
Generally LGTM, i suggested a simplification for the settings checks.
|
||
if (newJobData && newJobData.customUrls) { | ||
if (settingsData.custom_settings === undefined) { | ||
settingsData.custom_settings = {}; |
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.
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 : {};
💚 Build Succeeded |
…tic#21207) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
…tic#21207) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
…tic#21207) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
…tic#21207) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
…) (#21259) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
…) (#21261) * [ML] Fix saving of custom URLs for job created in Advanced page * [ML] Edit to custom URL save custom_settings following review
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_by
property undercustom_settings
if the job has custom URLs defined, as these will not be editable if the job is cloned via one of the job wizards.