Skip to content

[ML] Create watch from new jobs list#21112

Merged
jgowdyelastic merged 8 commits intoelastic:masterfrom
jgowdyelastic:create-watch-from-new-jobs-list
Jul 24, 2018
Merged

[ML] Create watch from new jobs list#21112
jgowdyelastic merged 8 commits intoelastic:masterfrom
jgowdyelastic:create-watch-from-new-jobs-list

Conversation

@jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Jul 23, 2018

Adds the missing create watch option when starting a datafeed which runs in real-time.

image

New react version of the watch configuration component.
The react version lives along side the original angular version and uses most of the same css.
Flyout has to be used rather than a modal because of this eui issue: elastic/eui#600

image

Upon creation, a toast notifies the user. The link to edit the new watch has been added as a button to the toast.

image

If a watch for this job already exists, a warning is shown.

image

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@jgowdyelastic jgowdyelastic changed the title [ML] [WIP] Create watch from new jobs list [ML] Create watch from new jobs list Jul 24, 2018

import { toastNotifications } from 'ui/notify';
import { loadFullJob } from '../utils';
import { mlCreateWatchService } from 'plugins/ml/jobs/new_job/simple/components/watcher/create_watch_service';
Copy link
Contributor

Choose a reason for hiding this comment

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

just a note that jest tests won't work with that path style because they don't support the automatic public insertion.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll update the paths in these files. However there are a lot of places where this full path is used and will need to be changed.
This can happen in a future PR


}
}
CreateWatchModal.propTypes = {
Copy link
Contributor

Choose a reason for hiding this comment

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

compile is used as a prop in the component but not added here to PropTypes.

Copy link
Member Author

Choose a reason for hiding this comment

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

good spot. compile isn't used anymore

};
}

export class CreateWatchModal extends Component {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be CreateWatchFlyout?

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

LGTM with latest changes.

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

A couple of aria-labels need changing I think, but otherwise LGTM

Now - <EuiFieldText
value={this.state.interval}
onChange={this.onIntervalChange}
aria-label="Use aria labels when no actual label is in use"
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to leave this aria-label value in like this? Shouldn't it say something like Set to now?

value={this.state.email}
onChange={this.onEmailChange}
placeholder="email address"
aria-label="Use aria labels when no actual label is in use"
Copy link
Contributor

Choose a reason for hiding this comment

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

As above, this aria-label text looks like a copy and paste from the docs. It should say something like 'email address' I think

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

jgowdyelastic added a commit to jgowdyelastic/kibana that referenced this pull request Jul 24, 2018
* [ML] [WIP] Create watch from new jobs list

* removing comments

* adding interval calculation

* adding checkbox to start datafeed modal

* adding proptypes check to SelectSeverity

* fixing typo

* changes based on review

* correcting input labels
jgowdyelastic added a commit that referenced this pull request Jul 24, 2018
* [ML] [WIP] Create watch from new jobs list

* removing comments

* adding interval calculation

* adding checkbox to start datafeed modal

* adding proptypes check to SelectSeverity

* fixing typo

* changes based on review

* correcting input labels
@jgowdyelastic
Copy link
Member Author

Related to #20150

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