-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
# Conflicts: # x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx
@elasticmachine merge upstream |
There was a problem hiding this 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.
...ck/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts
Show resolved
Hide resolved
x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.ts
Show resolved
Hide resolved
x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_filters.ts
Show resolved
Hide resolved
x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx
Show resolved
Hide resolved
…60659-alert-prefill
# Conflicts: # x-pack/plugins/infra/public/pages/metrics/index.tsx
There was a problem hiding this 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 :)
@elasticmachine merge upstream |
@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 Looks like a bad merge conf resolution, I'll fix |
# Conflicts: # x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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:
When you see this Inventory screen
The alert prefills with this
From this Metrics Explorer
To this alert