diff options
Diffstat (limited to 'lib/sidebars/projects/menus/analytics_menu.rb')
-rw-r--r-- | lib/sidebars/projects/menus/analytics_menu.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/sidebars/projects/menus/analytics_menu.rb b/lib/sidebars/projects/menus/analytics_menu.rb index fae2efd91de..96b50cdfcd1 100644 --- a/lib/sidebars/projects/menus/analytics_menu.rb +++ b/lib/sidebars/projects/menus/analytics_menu.rb @@ -41,9 +41,9 @@ module Sidebars 'chart' end - override :pick_into_super_sidebar? - def pick_into_super_sidebar? - true + override :serialize_as_menu_item_args + def serialize_as_menu_item_args + nil end private @@ -57,8 +57,9 @@ module Sidebars end ::Sidebars::MenuItem.new( - title: _('CI/CD'), + title: context.is_super_sidebar ? _('CI/CD analytics') : _('CI/CD'), link: charts_project_pipelines_path(context.project), + super_sidebar_parent: ::Sidebars::Projects::SuperSidebarMenus::AnalyzeMenu, active_routes: { path: 'pipelines#charts' }, item_id: :ci_cd_analytics ) @@ -70,8 +71,9 @@ module Sidebars end ::Sidebars::MenuItem.new( - title: _('Repository'), + title: context.is_super_sidebar ? _('Repository analytics') : _('Repository'), link: charts_project_graph_path(context.project, context.current_ref), + super_sidebar_parent: ::Sidebars::Projects::SuperSidebarMenus::AnalyzeMenu, container_html_options: { class: 'shortcuts-repository-charts' }, active_routes: { path: 'graphs#charts' }, item_id: :repository_analytics @@ -85,8 +87,9 @@ module Sidebars end ::Sidebars::MenuItem.new( - title: _('Value stream'), + title: context.is_super_sidebar ? _('Value stream analytics') : _('Value stream'), link: project_cycle_analytics_path(context.project), + super_sidebar_parent: ::Sidebars::Projects::SuperSidebarMenus::AnalyzeMenu, container_html_options: { class: 'shortcuts-project-cycle-analytics' }, active_routes: { path: 'cycle_analytics#show' }, item_id: :cycle_analytics |