Alert creation once failed prevents from retrying

Summary

If alert creation fails, the form gets disabled and it isn't possible to attempt creating again unless the page is reloaded. I believe this is a bad user experience.

Steps to reproduce

  1. Pre-req: A project with prometheus installed & working monitor dashboard.
  2. Navigate to > Operations > *Metrics.
  3. Select alert in the dropdown after clicking "more actions" icon on the right top of any chart (make sure there are no alerts for the metric).
  4. Switch off wifi or set network throttle to disabled.
  5. Fill up the alert form in the modal and save which should result in error state "Error creating alert".
  6. If the alert modal is re-opened, notice that the form is disabled and cannot attempt to create alert.

What is the expected correct behavior?

Even if the alert creation fails the user should be able to try again. It's nice to have an error message in the alert form but the form should not be disabled.

Relevant logs and/or screenshots

alert_creation_error

Assignee Loading
Time tracking Loading