[ML] Adding basic job validation#41459
Merged
jgowdyelastic merged 9 commits intoelastic:feature-new-ml-job-wizards-newfrom Jul 19, 2019
Merged
[ML] Adding basic job validation#41459jgowdyelastic merged 9 commits intoelastic:feature-new-ml-job-wizards-newfrom
jgowdyelastic merged 9 commits intoelastic:feature-new-ml-job-wizards-newfrom
Conversation
Contributor
💔 Build Failed |
Contributor
💚 Build Succeeded |
Contributor
|
Pinging @elastic/ml-ui |
Contributor
peteharverson
left a comment
There was a problem hiding this comment.
Overall LGTM. Just some minor comments.
I notice you aren't disabling the Next button if one of the validation checks fail. If you stick with that behaviour, I think you should probably add some indication on the final step as to why the Create button is disabled as all the validation messages are then hidden:
x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_validator/util.ts
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Don't forget to give this a meaningful ID when you replace the placeholder texts!
Member
Author
There was a problem hiding this comment.
Contributor
There was a problem hiding this comment.
As above, this will need a better ID when the placeholder texts are updated.
Member
Author
There was a problem hiding this comment.
x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_validator/util.ts
Outdated
Show resolved
Hide resolved
Contributor
💔 Build Failed |
peteharverson
approved these changes
Jul 19, 2019
Contributor
peteharverson
left a comment
There was a problem hiding this comment.
Latest changes LGTM
Contributor
💔 Build Failed |
285f130 to
e1db016
Compare
Contributor
💚 Build Succeeded |
jgowdyelastic
added a commit
that referenced
this pull request
Jul 31, 2019
* [ML] Adding new job wizards services (#40718) * [ML] Adding new job wizards services * adding ts-ignore for incomplte kibana timefilter type * [ML] New job wizards UI (#40748) * [ML] New job wizards UI * small refactor * fixing type problems * updating snapshots * updating translations ids for temporary new job links * updating translation ids * fixing population by field selection * small refactor to by field select * moving component descriptions to separate files * moving chart grid component into own file * fixing event rate count detector * fixing decimal place rounding * changes based on review * more changes based on review * fixing test * [ML] Adding created_by to job (#41015) * [ML] Adding json preview (#41078) * [ML] Adding job json preview * fix typo * [ML] Fixing view results button (#41077) * [ML] Adding generic custom settings functions to job creator (#41046) * [ML] Adding generic custom settings functions to job creator * fixing typo * [ML] Adding advanced section to job details step (#41157) * [ML] Adding advanced section to job details step * disabling model plot for population * changes based on review * updating include paths * [ML] Adding additional settings section to job details step (#41339) * [ML] Adding additional settings section to job details step * changes based on review * [ML] Adding basic job validation (#41459) * [ML] Adding basic job validation * removing observable * small refactor * comments and refactors * disabling create job button * adding duplicate job and group id checks * disabling next on invalid wizard step * changes based on review * removing unused includes * [ML] Adding advanced job validation (#41634) * [ML] Adding advanced job validation * clean up * function rename * updating tests * show some previous step info * removing . from validation titles * fixes advanced validation duration check * removing include * [ML] Changing wizard layout (#41802) * [ML] Changing wizard layout * adding a comment * fixing wizard step link issue * removing greyed out controls in summary * filtering out basic validation results * adding wizards steps back into summary * moving idFilterList * removing unused includes * [ML] Adding date picker to time range step (#41978) * [ML] Adding date picker to time range step * adding comments * sorting influencers * removing euiSize for width * [ML] Displaying job creation errors (#42165) * [ML] Displaying job creation errors * removing unnecessary try/catch * [ML] Updating index pattern type (#42269) * [ML] Updating index pattern type * changes based on review
jgowdyelastic
added a commit
to jgowdyelastic/kibana
that referenced
this pull request
Aug 5, 2019
* [ML] Adding new job wizards services (elastic#40718) * [ML] Adding new job wizards services * adding ts-ignore for incomplte kibana timefilter type * [ML] New job wizards UI (elastic#40748) * [ML] New job wizards UI * small refactor * fixing type problems * updating snapshots * updating translations ids for temporary new job links * updating translation ids * fixing population by field selection * small refactor to by field select * moving component descriptions to separate files * moving chart grid component into own file * fixing event rate count detector * fixing decimal place rounding * changes based on review * more changes based on review * fixing test * [ML] Adding created_by to job (elastic#41015) * [ML] Adding json preview (elastic#41078) * [ML] Adding job json preview * fix typo * [ML] Fixing view results button (elastic#41077) * [ML] Adding generic custom settings functions to job creator (elastic#41046) * [ML] Adding generic custom settings functions to job creator * fixing typo * [ML] Adding advanced section to job details step (elastic#41157) * [ML] Adding advanced section to job details step * disabling model plot for population * changes based on review * updating include paths * [ML] Adding additional settings section to job details step (elastic#41339) * [ML] Adding additional settings section to job details step * changes based on review * [ML] Adding basic job validation (elastic#41459) * [ML] Adding basic job validation * removing observable * small refactor * comments and refactors * disabling create job button * adding duplicate job and group id checks * disabling next on invalid wizard step * changes based on review * removing unused includes * [ML] Adding advanced job validation (elastic#41634) * [ML] Adding advanced job validation * clean up * function rename * updating tests * show some previous step info * removing . from validation titles * fixes advanced validation duration check * removing include * [ML] Changing wizard layout (elastic#41802) * [ML] Changing wizard layout * adding a comment * fixing wizard step link issue * removing greyed out controls in summary * filtering out basic validation results * adding wizards steps back into summary * moving idFilterList * removing unused includes * [ML] Adding date picker to time range step (elastic#41978) * [ML] Adding date picker to time range step * adding comments * sorting influencers * removing euiSize for width * [ML] Displaying job creation errors (elastic#42165) * [ML] Displaying job creation errors * removing unnecessary try/catch * [ML] Updating index pattern type (elastic#42269) * [ML] Updating index pattern type * changes based on review
jgowdyelastic
added a commit
that referenced
this pull request
Aug 5, 2019
* [ML] Adding new job wizards services (#40718) * [ML] Adding new job wizards services * adding ts-ignore for incomplte kibana timefilter type * [ML] New job wizards UI (#40748) * [ML] New job wizards UI * small refactor * fixing type problems * updating snapshots * updating translations ids for temporary new job links * updating translation ids * fixing population by field selection * small refactor to by field select * moving component descriptions to separate files * moving chart grid component into own file * fixing event rate count detector * fixing decimal place rounding * changes based on review * more changes based on review * fixing test * [ML] Adding created_by to job (#41015) * [ML] Adding json preview (#41078) * [ML] Adding job json preview * fix typo * [ML] Fixing view results button (#41077) * [ML] Adding generic custom settings functions to job creator (#41046) * [ML] Adding generic custom settings functions to job creator * fixing typo * [ML] Adding advanced section to job details step (#41157) * [ML] Adding advanced section to job details step * disabling model plot for population * changes based on review * updating include paths * [ML] Adding additional settings section to job details step (#41339) * [ML] Adding additional settings section to job details step * changes based on review * [ML] Adding basic job validation (#41459) * [ML] Adding basic job validation * removing observable * small refactor * comments and refactors * disabling create job button * adding duplicate job and group id checks * disabling next on invalid wizard step * changes based on review * removing unused includes * [ML] Adding advanced job validation (#41634) * [ML] Adding advanced job validation * clean up * function rename * updating tests * show some previous step info * removing . from validation titles * fixes advanced validation duration check * removing include * [ML] Changing wizard layout (#41802) * [ML] Changing wizard layout * adding a comment * fixing wizard step link issue * removing greyed out controls in summary * filtering out basic validation results * adding wizards steps back into summary * moving idFilterList * removing unused includes * [ML] Adding date picker to time range step (#41978) * [ML] Adding date picker to time range step * adding comments * sorting influencers * removing euiSize for width * [ML] Displaying job creation errors (#42165) * [ML] Displaying job creation errors * removing unnecessary try/catch * [ML] Updating index pattern type (#42269) * [ML] Updating index pattern type * changes based on 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.

Adds basic job validation to all job wizards. This reproduces the same form validation present in the current job wizards and uses the same core basic validation checks.
This works by running the validation every time the
jobCreatoris updated.Once validation is complete,
jobValidatorUpdatedis triggered and so any components listening to that variable can pull what they need from the results and display the errors if they exist.Checks covered:
jobId
Does it contain bad characters. The ID isn't already being used by a job or group.
groupIds
Do any groups contain bad characters. Newly added groups aren't already being used by a job or group
modelMemoryLimit
Is it a valid format and is it below the max model memory limit.
bucketSpan
Is it a valid format.
duplicateDetectors
Are any two detectors the same. Only needed for population jobs.
Errors are displayed inline:
