Skip to content

Update metrics dashboard finder to list all predefined dashboards

Reuben Pereira requested to merge 218649-change-finder into master

What does this MR do?

Currently, any new out of the box dashboard has to be manually added to the Gitlab::Metrics::Dashboard::Finder file so that it is included in the list of all dashboards on the metrics dashboard page.

This MR updates Gitlab::Metrics::Dashboard::Finder so that all out of the box dashboards get automatically listed, and a manual change has to be done to exclude a dashboard.

Any new out of the box dashboards will still have to be added to the spec/lib/gitlab/metrics/dashboard/finder_spec.rb spec file, so we won't have new dashboards unexpectedly appearing in the list. The benefit of this change is that, the addition of a new out of the box dashboard will result in a spec failure, and the author will have to choose whether to allow the new dashboard to be listed or exclude it. Without this change, it is easy to add a new dashboard and forget to add it to the list of all dashboards.

Issue: #218649 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Reuben Pereira

Merge request reports