[Metrics UI] Prefill alerts from the global dropdown#68967
[Metrics UI] Prefill alerts from the global dropdown#68967Zacqary merged 20 commits intoelastic:masterfrom
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 |
simianhacker
left a comment
There was a problem hiding this comment.
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
# Conflicts: # x-pack/plugins/infra/public/pages/metrics/index.tsx
|
@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: |
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…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>



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