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

[Metrics UI] Prefill alerts from the global dropdown #68967

Merged
merged 20 commits into from
Jun 25, 2020

Conversation

Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Jun 11, 2020

Summary

Closes #60659

Metric Threshold and Inventory alerts will now pre-populate based on your current filters when you create an alert from the Alerts dropdown:
Screen Shot 2020-06-11 at 4 47 29 PM

When you see this Inventory screen

Screen Shot 2020-06-11 at 4 43 46 PM

The alert prefills with this

Screen Shot 2020-06-11 at 4 43 51 PM

From this Metrics Explorer

Screen Shot 2020-06-11 at 4 45 50 PM

To this alert

Screen Shot 2020-06-11 at 4 46 12 PM

@Zacqary Zacqary added release_note:enhancement Feature:Alerting Feature:Metrics UI Metrics UI feature v8.0.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.9.0 labels Jun 11, 2020
@Zacqary Zacqary requested a review from a team as a code owner June 11, 2020 21:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@Zacqary
Copy link
Contributor Author

Zacqary commented Jun 17, 2020

@elasticmachine merge upstream

@simianhacker simianhacker self-requested a review June 17, 2020 19:34
Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

Everything looks really good.

I want to start making an effort to start filling in some of the test coverage for our app. As a team (I'm probably the most guilty) we've been really laxed about testing, I want to work on changing that.

In that spirit, I added some comments about updating a test and adding tests for some of the hooks that don't have them. For some of the hooks that don't have tests where we've added the useAlertPrefillContext() it's ok to set up the minimum to just test the new code. If you have the extra time and want to fill in test for the rest of the functionality, that would really be appreciated but it's not required since technically it's out of the scope of this PR. Eventually, we will need to fill those in but that can be done later as "tech debt" cleanup.

@Zacqary Zacqary requested a review from a team as a code owner June 18, 2020 22:03
Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

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

Triggers actions UI code LGTM. Great seeing UX enhancements like this :)

@Zacqary
Copy link
Contributor Author

Zacqary commented Jun 23, 2020

@elasticmachine merge upstream

@Zacqary
Copy link
Contributor Author

Zacqary commented Jun 23, 2020

@simianhacker Added all the tests you requested. New test files are just testing the new prefill functionality in this PR, but there's a framework to fill them out when we cover tech debt

@simianhacker
Copy link
Member

For some reason this PR shows two headers:

image

and on the Metrics Explorer page I'm getting this error:

image

@Zacqary
Copy link
Contributor Author

Zacqary commented Jun 23, 2020

@simianhacker Looks like a bad merge conf resolution, I'll fix

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM

@Zacqary Zacqary merged commit 71ea1a0 into elastic:master Jun 25, 2020
@Zacqary Zacqary deleted the 60659-alert-prefill branch June 25, 2020 17:01
Zacqary added a commit to Zacqary/kibana that referenced this pull request Jun 25, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Zacqary added a commit that referenced this pull request Jun 25, 2020
…69981)

* [Metrics UI] Prefill alerts from the global dropdown (#68967)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Fix uncaught typecheck merge conflict

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@sorantis
Copy link

Conditions disappear from the flyout if I remove the queried metrics.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Feature:Metrics UI Metrics UI feature release_note:enhancement Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Metrics Alerts] Add ability to pre-populate alert from the Metrics Explorer toolbar
6 participants