fix(zero_value_checks): checks can now have a value set to 0 #17933
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #17729
Problem
0
would not be triggered. When a user would edit their check, the value would return blankSolution
Updated the threshold value to remove
omitEmpty
on thresholds since that was removing values set to zero.As per this helpful resource, go will remove nil values if the flag
omitEmpty
is present.It doesn't seem like there was any obvious reason for this to be present since a check should never be created without a value set for the threshold. The UI doesn't allow for this condition, and the API shouldn't allow for this condition.
I added an e2e test to ensure that this bug doesn't pop its head again, and I added an additional check to ensure that we can name & rename checks. I also updated the AlertBuilder.scss to fix weird styling issue