blob: 620f6e78edaa282fe5bb6cfc5e2155100827bcbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# frozen_string_literal: true
module Sidebars
module Groups
class SuperSidebarPanel < ::Sidebars::Groups::Panel
include ::Sidebars::Concerns::SuperSidebarPanel
extend ::Gitlab::Utils::Override
override :configure_menus
def configure_menus
super
old_menus = @menus
@menus = []
add_menu(Sidebars::StaticMenu.new(context))
add_menu(Sidebars::Groups::SuperSidebarMenus::PlanMenu.new(context))
pick_from_old_menus(old_menus)
insert_menu_before(
Sidebars::Groups::Menus::ObservabilityMenu,
Sidebars::Groups::SuperSidebarMenus::OperationsMenu.new(context)
)
insert_menu_before(
Sidebars::Groups::Menus::SettingsMenu,
Sidebars::UncategorizedMenu.new(context)
)
transform_old_menus(@menus, @scope_menu, *old_menus)
end
override :super_sidebar_context_header
def super_sidebar_context_header
{
title: context.group.name,
avatar: context.group.avatar_url,
id: context.group.id
}
end
end
end
end
|