Add frontend validation for uploading metrics images
Summary
When uploading an image to the metrics tab, there is no validation in the frontend of the URL, when an invalid URL is passed, it will only fail after clicking upload.
By adding validation in the frontend, it will allow the user to quickly see the mistake and have the option to fix rather than starting the process over.
Steps to reproduce
- Navigate to Monitor > Incidents page
- Create new or open an existing incident
- Navigate to Metrics tab of the incident
- Add new metric image using incorrectly formatted URL
Relevant logs and/or screenshots
Validation rules listed in pop up but not enforced:
Possible fixes
Implementation guide
Files to look at:
- app/assets/javascripts/vue_shared/components/metric_images/metric_images_tab.vue
