Automatically enable custom dashboard creation for the project you enabled for Product Analytics
During the PA onboarding, customers setup their datasource in Settings > Analyze. Once completed and data is flowing, we should drive them to the Analytics dashboards (see additional ticket to add that flow.) Upon their first click into the Analytics dashboards, they are presented with another step to go back Settings to configure custom.
We should eliminate this step and automatcially enable custom for the project they initially used to setup Product Analytics. In the event that they want to change where they store custom visualizations and dashboard configurations, they can modify it, but we should:
- Automatically enable it for the project
- Have a quick link on that page to get back to the Analyze settings
- Generate a tooltip that tells them what they can configure in settings as well as on the Custom visualization and New Dashboard flow : "If you'd like to store your configuration in another GitLab project, you can modify your settings"
Implementation plan
backend
- Make the following changes in the
Analytics::AnalyticsDashboardsHelper
module so that frontend receives the current project asdashboard_project
when there is no custom dashboard project set up.
Propossed diff is something like (to give an idea)
def project_dashboard_pointer(project)
- project.analytics_dashboards_pointer.target_project
+ if project.analytics_dashboards_pointer.present?
+ project.analytics_dashboards_pointer.target_project
+ else
+ project
+ end
end
def group_dashboard_pointer(group)
@@ -122,7 +126,7 @@ def group_dashboard_pointer(group)
end
def analytics_dashboard_pointer_project(namespace)
- return unless namespace.analytics_dashboards_pointer
+ return unless project?(namespace) || namespace.analytics_dashboards_pointer
pointer_project = project?(namespace) ? project_dashboard_pointer(namespace) : group_dashboard_pointer(namespace)
- Update specs and relevant documentation.
- Verify that sync funnels worker and move funnels worker still works as expected
frontend Moved to Link to the analytics settings from the dashboa... (#466035).