Commit 5f02596d authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '196454-make-pa-group-level-default' into 'master'

Move productivity analytics to the group level

See merge request gitlab-org/gitlab!25329
parents 115c1391 6674536b
...@@ -25,10 +25,7 @@ Productivity Analytics allows GitLab users to: ...@@ -25,10 +25,7 @@ Productivity Analytics allows GitLab users to:
## Accessing metrics and visualizations ## Accessing metrics and visualizations
To access the **Productivity Analytics** page: To access the chart, navigate to a group's sidebar and select **Analytics > Productivity Analytics**.
1. Go to **Analytics** from the top navigation bar.
1. Select **Productivity Analytics** from the menu.
The following metrics and visualizations are available on a project or group level - currently only covering **merged** merge requests: The following metrics and visualizations are available on a project or group level - currently only covering **merged** merge requests:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
class Analytics::AnalyticsController < Analytics::ApplicationController class Analytics::AnalyticsController < Analytics::ApplicationController
def index def index
if Feature.disabled?(:group_level_productivity_analytics) && Gitlab::Analytics.productivity_analytics_enabled? if Feature.disabled?(:group_level_productivity_analytics, default_enabled: true) && Gitlab::Analytics.productivity_analytics_enabled?
redirect_to analytics_productivity_analytics_path redirect_to analytics_productivity_analytics_path
elsif Gitlab::Analytics.cycle_analytics_enabled? elsif Gitlab::Analytics.cycle_analytics_enabled?
redirect_to analytics_cycle_analytics_path redirect_to analytics_cycle_analytics_path
......
...@@ -25,8 +25,8 @@ module EE ...@@ -25,8 +25,8 @@ module EE
private private
def productivity_analytics_navbar_link(group, current_user) def productivity_analytics_navbar_link(group, current_user)
return unless ::Feature.enabled?(:analytics_pages_under_group_analytics_sidebar, group) return unless ::Feature.enabled?(:analytics_pages_under_group_analytics_sidebar, group, default_enabled: true)
return unless ::Feature.enabled?(:group_level_productivity_analytics) return unless ::Feature.enabled?(:group_level_productivity_analytics, default_enabled: true)
return unless group_sidebar_link?(:productivity_analytics) return unless group_sidebar_link?(:productivity_analytics)
navbar_sub_item( navbar_sub_item(
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
= sprite_icon('chart', size: 24) = sprite_icon('chart', size: 24)
.sidebar-context-title= _('Analytics') .sidebar-context-title= _('Analytics')
%ul.sidebar-top-level-items %ul.sidebar-top-level-items
- if Feature.disabled?(:group_level_productivity_analytics) && Gitlab::Analytics.productivity_analytics_enabled? - if Feature.disabled?(:group_level_productivity_analytics, default_enabled: true) && Gitlab::Analytics.productivity_analytics_enabled?
= nav_link(controller: :productivity_analytics) do = nav_link(controller: :productivity_analytics) do
= link_to analytics_productivity_analytics_path, class: 'qa-sidebar-productivity-analytics' do = link_to analytics_productivity_analytics_path, class: 'qa-sidebar-productivity-analytics' do
.nav-icon-container .nav-icon-container
......
---
title: Move Productivity Analytics page to the group level
merge_request: 25329
author:
type: changed
...@@ -32,7 +32,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do ...@@ -32,7 +32,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
end end
end end
namespace :analytics do namespace :analytics do
resource :productivity_analytics, only: :show, constraints: -> (req) { Feature.enabled?(:group_level_productivity_analytics) && Gitlab::Analytics.productivity_analytics_enabled? } resource :productivity_analytics, only: :show, constraints: -> (req) { Feature.enabled?(:group_level_productivity_analytics, default_enabled: true) && Gitlab::Analytics.productivity_analytics_enabled? }
end end
resource :ldap, only: [] do resource :ldap, only: [] do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment