Add informational tooltips to AI Impact Analytics overview tiles
What does this MR do and why?
Adds informational tooltips with raw values to AI Impact Analytics overview tiles.
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 | |
---|---|---|
Duo seats: Assigned and used |
||
Code Suggestions: Unique users |
||
Code Suggestions: Acceptance rate |
||
No data |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Ensure that you are using GitLab Ultimate
- Configure your GDK to use ClickHouse
- Enable the Clickhouse application setting for analytics
- Seed AI analytics data:
FILTER=ai_usage_stats bundle exec rake db:seed_fu
and apply the diff below to mock data for the Duo seats: Assigned and used tile - Create a new group
- Navigate to the Analytics dashboard page for the new group (ex. http://gdk.test:3000/groups/flightjs/-/analytics/dashboards)
- Select the
AI impact analytics
dashboard - Verify that the tooltips appear in the single stat overview tiles atop the dashboard
Duo seats: Assigned and used
Mock data for The seeded analytics data does not mock the number of Duo Pro seats included in your subscription. The metric will show as 0% if this number is 0. It can be mocked by applying the diff below:
diff --git a/ee/app/services/analytics/ai_analytics/ai_metrics_service.rb b/ee/app/services/analytics/ai_analytics/ai_metrics_service.rb
index e08932914ce2..361191fb541a 100644
--- a/ee/app/services/analytics/ai_analytics/ai_metrics_service.rb
+++ b/ee/app/services/analytics/ai_analytics/ai_metrics_service.rb
@@ -31,7 +31,7 @@ def add_duo_pro_assigned(data)
users = GitlabSubscriptions::AddOnAssignedUsersFinder.new(
current_user, namespace, add_on_name: :code_suggestions).execute
- data.merge(duo_pro_assigned_users_count: users.count)
+ data.merge(duo_pro_assigned_users_count: 100)
end
def add_code_suggestions_usage(data)
Related to #477213 (closed)
Edited by Rudy Crespo