Skip to content
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 Frames: Analytics job creation. #43102

Merged
merged 7 commits into from
Aug 13, 2019

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Aug 12, 2019

Part of #43175.

Summary

Introduces data frame analytics job creation. This first version uses a form within a modal on the analytics jobs list page, because there is no preview available and the form isn't very complex. Job creation might move to a separate page in the future.

data-frame-analytics-create-modal

  • This uses useReducer() in a custom hook (see React Docs. The custom hook useCreateAnalyticsForm() exposes the current state and actions needed by the UI. This way the components CreateAnalyticsForm , CreateAnalyticsModal and CreateAnalyticsButton are not aware of any state logic, they just consume a state and trigger actions.
  • The job creation form as well as the actions which trigger API calls (e.g. get index patterns, create/start jobs) are mostly an adapted copy of data frame transforms code.

Note this PR doesn't include any unit tests yet. The feature is experimental and tests will be done in a follow up.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a test locally and seemed to work as expected. LGTM ⚡️

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of comments but on the whole LGTM

return state;
};

enum ACTION {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like this could be a normal numerical enum, e.g.

enum ACTION {
  ADD_REQUEST_MESSAGE,
  RESET_REQUEST_MESSAGES,
....

}

// List of system fields we want to ignore for the numeric field check.
const OMIT_FIELDS: string[] = ['_source', '_type', '_index', '_id', '_version', '_score'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be moved to a shared location along with the copy in datavisualizer

@walterra walterra merged commit 7256903 into elastic:master Aug 13, 2019
@walterra walterra deleted the ml-dfa-create branch August 13, 2019 10:03
walterra added a commit to walterra/kibana that referenced this pull request Aug 13, 2019
Introduces data frame analytics job creation. This first version uses a form within a modal on the analytics jobs list page, because there is no preview available and the form isn't very complex. Job creation might move to a separate page in the future.
jloleysens added a commit to jloleysens/kibana that referenced this pull request Aug 13, 2019
…p-metrics-selectall

* 'master' of github.com:elastic/kibana: (27 commits)
  [ML] Data Frames: Analytics job creation. (elastic#43102)
  [Vis Default editor] Fix issue with Rollup (elastic#42430)
  [Vis: Default editor] EUIficate Markdown tab (elastic#42677)
  [New Platform Migration Phase I]: update dateHisogramInterval & parseEsInterval imports (elastic#42917)
  [Infra UI] Add AWS metrics to node detail page (elastic#42153)
  update apm index pattern (elastic#43106)
  [SIEM] Toggle Column / Code Coverage and Cypress (elastic#42766)
  skip failing test (elastic#43163)
  [code] Add option to turn the go dependency download on/off. (elastic#43096)
  disable visual regression jobs
  Removed dead code (elastic#42774)
  fixes csv export of saved searches that have _source field (elastic#43123)
  Export missing Context types (elastic#43051)
  Update dependency supports-color to v7 (elastic#43064)
  switch to icon type string instead of node (elastic#43111)
  [Maps] Enable borders for icon symbols (elastic#43066)
  [ftr] enable visualRegression jobs (elastic#42989)
  [ML] Converting single to multi metric job (elastic#42532)
  fix(NA): dont clean dll module if it is a package json file (elastic#42904)
  [Logs UI] Add link from the sample web logs to the Logs UI (elastic#42635)
  ...
walterra added a commit that referenced this pull request Aug 13, 2019
Introduces data frame analytics job creation. This first version uses a form within a modal on the analytics jobs list page, because there is no preview available and the form isn't very complex. Job creation might move to a separate page in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants