-
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] Data frame analytics: Advanced editor. #43989
Conversation
Pinging @elastic/ml-ui |
💔 Build Failed |
💔 Build Failed |
💚 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.
LGTM
...data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx
Outdated
Show resolved
Hide resolved
...c/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts
Outdated
Show resolved
Hide resolved
..._management/components/create_analytics_advanced_editor/create_analytics_advanced_editor.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.
A couple of minor comments on the use of id
and one of the action labels.
I think it would be useful to expose the model_memory_limit
as a setting in the editor. This should be given a reasonable (fixed) default for now - suggest 50MB. Then for 7.5 we should look at passing the config to the new endpoint to pre-populate this field with a sensible default - see #43740. Could an extra field also be added to the form editor for the model memory limit?
...c/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
@peteharverson In 1888b6e for both the form and advanced editor the default memory limit is set to |
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.
Latest edits 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.
Just left a comment on some odd behavior.
@alvarezmelissa87 oh so sorry - looks like I missed saving one file change so it looked ok in my editor but git didn't pick it up :( - I just pushed the missing bit can you please try again? |
Tested again with latest updates and works as expected 🙌 Thanks, @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.
Latest changes LGTM ⚡️
💚 Build Succeeded |
Adds an option to switch to an advanced (JSON) editor when creating an analytics job. This builds upon the previous work for the modal for analytics job creation and the use of useReducer(): - The files of the custom hook useCreateAnalyticsForm() have been further split up and there's now separate actions.ts and state.ts files. - To only allow updating what's really related to the form value's state via setFormState, the state structure has been updated and more fine grained actions have been added. - The user can enabled the advanced editor, but cannot move back to the original form (there's a help text in the UI about that). - The advanced editor component's (CreateAnalyticsAdvancedEditor) structure is based on the regular form, it still has an input field for the job ID and the toggle for optionally creating an index pattern. The fields for source/destination index are replaced by an editable JSON textarea input. - The advanced editor features mostly the same validation like the regular form. For example, if the source index isn't valid, an error will be shown in a CallOut below the editable area.
Adds an option to switch to an advanced (JSON) editor when creating an analytics job. This builds upon the previous work for the modal for analytics job creation and the use of useReducer(): - The files of the custom hook useCreateAnalyticsForm() have been further split up and there's now separate actions.ts and state.ts files. - To only allow updating what's really related to the form value's state via setFormState, the state structure has been updated and more fine grained actions have been added. - The user can enabled the advanced editor, but cannot move back to the original form (there's a help text in the UI about that). - The advanced editor component's (CreateAnalyticsAdvancedEditor) structure is based on the regular form, it still has an input field for the job ID and the toggle for optionally creating an index pattern. The fields for source/destination index are replaced by an editable JSON textarea input. - The advanced editor features mostly the same validation like the regular form. For example, if the source index isn't valid, an error will be shown in a CallOut below the editable area.
Summary
Adds an option to switch to an advanced (JSON) editor when creating an analytics job.
This builds upon the previous work for the modal for analytics job creation and the use of
useReducer()
:useCreateAnalyticsForm()
have been further split up and there's now separateactions.ts
andstate.ts
files.setFormState
, the state structure has been updated and more fine grained actions have been added.CreateAnalyticsAdvancedEditor
) structure is based on the regular form, it still has an input field for thejob ID
and the toggle for optionally creating an index pattern. The fields for source/destination index are replaced by an editable JSON textarea input.CallOut
below the editable area.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Documentation was added for features that require explanation or tutorialsFor maintainers