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] Adds link to anomaly detection job creation from the alerting rule form #174016

Merged
merged 9 commits into from
Jan 3, 2024

Conversation

darnautov
Copy link
Contributor

Summary

Closes #173654

Adds an option to create a new anomaly detection job from the job selector control.

image

Checklist

@darnautov darnautov added release_note:enhancement :ml Feature:Anomaly Detection ML anomaly detection Feature:Alerting/RuleTypes Issues related to specific Alerting Rules Types Team:ML Team label for ML (also use :ml) v8.13.0 labels Dec 28, 2023
@darnautov darnautov requested review from walterra and qn895 December 28, 2023 11:04
@darnautov darnautov self-assigned this Dec 28, 2023
@darnautov darnautov requested a review from a team as a code owner December 28, 2023 11:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@darnautov darnautov requested a review from qn895 December 29, 2023 15:41
@qn895
Copy link
Member

qn895 commented Dec 29, 2023

Tested and LGTM, but I wonder if it's better to either have the select open the link in another tab, or have a prompt message with the link before the selection box.

With the current flow, user would come in, fill out info, select ---Create new---, and be redirected to the job creation page. But effectively they would have to navigate back to the rule later on and lose the info filled out.

Screen.Recording.2023-12-29.at.10.15.09.mov

The spacing before the Alert when hint also looks odd

image

@darnautov
Copy link
Contributor Author

@elasticmachine merge upstream

@darnautov
Copy link
Contributor Author

darnautov commented Jan 2, 2024

hi @qn895, thanks for the feedback!

it's better to either have the select open the link in another tab

Kibana is a SPA, so opening the same window is significantly faster and provides a better UX.

or have a prompt message with the link before the selection box.

It'll consume additional vertical space and require the user to read the warning, while we should have this option available at all times. Having the creation entry directly in the relevant control seems like a better option IMO.

With the current flow, user would come in, fill out info, select ---Create new---, and be redirected to the job creation page. But effectively they would have to navigate back to the rule later on and lose the info filled out.

It redirects the user to the Job wizard page, and at the last step of the wizard, we have a button to create an alerting rule, that opens a flyout with a populated job field.

The spacing before the Alert when hint also looks odd

It is controlled by the alerting flyout and looks the same for all alerting rules.

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.

Tested latest changes and LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
ml 1886 1889 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 3.6MB 3.6MB +2.0KB
securitySolution 11.3MB 11.3MB +6.4KB
securitySolutionServerless 354.9KB 361.2KB +6.3KB
total +14.6KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
ml 78.2KB 78.2KB +2.0B
securitySolutionServerless 40.6KB 40.6KB -1.0B
total +1.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
ml 553 552 -1

Total ESLint disabled count

id before after diff
ml 556 555 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @darnautov

@darnautov darnautov merged commit 085da72 into elastic:main Jan 3, 2024
21 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 3, 2024
@darnautov darnautov deleted the ml-173654-create-job-link branch January 3, 2024 15:07
@peteharverson peteharverson changed the title [ML] Link to Anomaly detection job creation from the alerting rule form [ML] Adds link to Anomaly detection job creation from the alerting rule form Feb 14, 2024
@peteharverson peteharverson changed the title [ML] Adds link to Anomaly detection job creation from the alerting rule form [ML] Adds link to anomaly detection job creation from the alerting rule form Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Alerting/RuleTypes Issues related to specific Alerting Rules Types Feature:Anomaly Detection ML anomaly detection :ml release_note:enhancement Team:ML Team label for ML (also use :ml) v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Link to Anomaly detection job creation from the alerting rule form
6 participants