Skip to content

Add GitLab Duo usage analytics dashboard to shared dashboards

What does this MR do and why?

Creates the initial scaffolding for the Duo usage analytics dashboard at the group and project levels behind a wip feature flag named duo_usage_dashboard. It includes barebones YAML configurations for both and ensures correct access based on Reporter+ user role and assignment to any Duo seat type.

References

https://gitlab.com/gitlab-org/gitlab/-/issues/550047

Screenshots or screen recordings

Dashboards list Dashboard view
Screenshot 2025-06-27 at 1.10.41 PM.png Screenshot 2025-06-27 at 1.10.55 PM.png

How to set up and validate locally

  1. Please make sure that you're on the GitLab Ultimate plan.

  2. Enable this patch to temporarily mock permissions:

    diff --git a/ee/app/models/ee/user.rb b/ee/app/models/ee/user.rb
    index a6c1baf5cda1e..63cb6ccb975cb 100644
    --- a/ee/app/models/ee/user.rb
    +++ b/ee/app/models/ee/user.rb
    @@ -553,7 +553,7 @@ def assigned_to_duo_add_ons?(container)
             .active
             .by_namespace(namespace)
             .assigned_to_user(self)
    -        .exists?
    +        .exists? || true
         end
     
         def group_sso?(group)
    
  3. Enable feature flag (globally or for a group): echo "Feature.enable(:duo_usage_dashboard)" | bundle exec rails c

  4. Navigate to Analytics > Dashboards at the group level

  5. Select the GitLab Duo usage analytics dashboard

  6. Verify that the dashboard is displayed

  7. Repeat steps 3-5 at the project level

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #550047

Edited by Rudy Crespo

Merge request reports

Loading