-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(aci): Add metric monitor template dropdown #102992
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #102992 +/- ##
===========================================
- Coverage 80.63% 80.63% -0.01%
===========================================
Files 9020 9020
Lines 392592 392572 -20
Branches 24972 24969 -3
===========================================
- Hits 316558 316540 -18
+ Misses 75637 75635 -2
Partials 397 397 |
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.
Bug: Default Value Mismatch Breaks UI
The defaultValue is set to "automatic" but the valid values for resolutionStrategy are 'default' and 'custom'. This will cause the radio field to have an invalid default value that doesn't match any of the available options.
static/app/views/detectors/components/forms/metric/resolveSection.tsx#L133-L134
sentry/static/app/views/detectors/components/forms/metric/resolveSection.tsx
Lines 133 to 134 in 8d8cc29
| choices={resolutionStrategyChoices} | |
| defaultValue="automatic" |
| // Only set query if template has one and user hasn't customized the filter | ||
| if (meta.query !== undefined && !currentQuery) { | ||
| formContext.form?.setValue(METRIC_DETECTOR_FORM_FIELDS.query, meta.query); | ||
| } |
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.
Bug: Template Query Logic Prevents Updates
When switching between templates that both have queries, the query won't update because !currentQuery evaluates to false. After selecting a template with a query, switching to another template with a different query won't apply the new query value since currentQuery is now truthy from the first template.
adds a template dropdown and moves customize section into a collapsible component
overall feel of the form after these changes
template options