Form for creating an alert should be validated before submitting in Monitor dashboard
Summary
Form for creating an alert should be validated before submitting.
Additionally, errors in creating or updating alerts should be handled correctly.
Steps to reproduce
- Go to metrics dashboard
- Select a panel with data
- Click on "Add alert"
- Don't select an operation (!)
- Select a metric
- Select a value for threshold
What is the current bug behavior?
Form is submitted without an operator, network request fails and popup is closed.
What is the expected correct behavior?
Either:
- Form is not submitted without an operator
- Or, network request failure allows the user to reenter values
Relevant logs and/or screenshots
Related to #14622 (closed)
Output of checks
This bug happens on GitLab.com
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)