Add AI impact visualizations to the analytics dashboard designer

What does this MR do and why?

Adds the visualizatons used in the AI impact dashboard to the analytics dashboard designer, so that they can be re-used in custom dashboards.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2025-01-28_at_10.36.18_AM Screenshot_2025-01-28_at_10.34.51_AM

New visualizations

Screenshot_2025-01-28_at_10.38.20_AM

How to set up and validate locally

  1. Enable the feature flag in rails console:
    Feature.enable(:group_analytics_dashboard_editor)
  2. Configure your GDK to use ClickHouse
  3. Make sure ClickHouse is being used for Analytics by running this in the Rails console:
Gitlab::CurrentSettings.current_application_settings.update(use_clickhouse_for_analytics: true)
  1. Apply this diff to mock the permissions for the AI impact analytics dashboard:
diff --git a/ee/app/models/ee/user.rb b/ee/app/models/ee/user.rb
index d4334b16d41f..0b5b0e70467b 100644
--- a/ee/app/models/ee/user.rb
+++ b/ee/app/models/ee/user.rb
@@ -492,6 +492,7 @@ def using_gitlab_com_seat?(namespace)
     end
 
     def assigned_to_duo_enterprise?(container)
+      return true
       namespace = ::Gitlab::Saas.feature_available?(:gitlab_duo_saas_only) ? container.root_ancestor : nil
 
       GitlabSubscriptions::AddOnPurchase
@@ -502,6 +503,7 @@ def assigned_to_duo_enterprise?(container)
     end
 
     def assigned_to_duo_pro?(container)
+      return true
       namespace = ::Gitlab::Saas.feature_available?(:gitlab_duo_saas_only) ? container.root_ancestor : nil
 
       GitlabSubscriptions::AddOnPurchase
  1. Navigate to Analytics Dashboard Editor for a group or project
  2. Create a New Dashboard
  3. Verify that AI impact visualizations are available in the built-in visualizations list
  4. Confirm that visualizations can be added to the custom dashboard
  5. Test that visualizations are not available when the permissions are disabled

Related to #508775 (closed)

Edited by Alex Pennells

Merge request reports

Loading