Skip to content

Hide ability to create alert on custom metrics dashboard

Summary

Custom metrics dashboard currently does not support alerts (#194267 (closed)). Attempting to create an alert renders a weird frontend bug of undefined. A page refresh does make it go away but we should just hide the alert option in the dropdown so that a user does not stumble upon this unsupported feature.

Steps to reproduce

  1. Create a custom metrics dashboard
  2. Click on the dropdown associated to a chart on the custom metrics dashboard
  3. Click on Alerts
  4. Fill in the alerts fields and click add
  5. Notice the odd undefined message

Example Project

https://ops.gitlab.net/gitlab-com/metrics-dogfooding/-/environments/266/metrics?dashboard=.gitlab%2Fdashboards%2Fuptime.yml&duration_seconds=604800

What is the current bug behavior?

(What actually happens)

What is the expected correct behavior?

(What you should see instead)

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)