Skip to content

Return configured project dashboards when set

What does this MR do and why?

This updates the dashbards GraphQL query to use a configured project repository when set, instead of locally defined dashboards

How to set up and validate locally

Query

query {
  project(fullPath: "gitlab-org/gitlab-shell") {
    name
    productAnalyticsDashboards {
      edges {
        node {
          title
        }
      }
    }
  }
}

.gitlab/product_analytics/dashboards/A.yml

---
title: A Custom Dashboard

.gitlab/product_analytics/dashboards/B.yml

---
title: B Custom Dashboard
  1. Enable product analytics feature flags (project_analytics_dashboards_page and product_analytics_internal_preview)
  2. Create two projects, A and B
  3. Add local dashboards to the A repository at .gitlab/product_analytics/dashboards
  4. Add other dashboards to B at the same location
  5. Go to A >> Settings >> Analytics Dashboards and set the project there to B
  6. A GraphQL query for A's dashboards should now show B's dashboards instead (i.e. B Custom Dashboard)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #394847 (closed)

Edited by Allen Cook

Merge request reports