blob: 95a5c183e968535e4cfd6037d34e877b74916f69 (
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
44
45
46
47
48
|
# frozen_string_literal: true
module Sidebars
module Admin
class Panel < ::Sidebars::Panel
override :configure_menus
def configure_menus
super
add_menus
end
override :render_raw_scope_menu_partial
def render_raw_scope_menu_partial
"shared/nav/admin_scope_header"
end
override :aria_label
def aria_label
s_("Admin|Admin Area")
end
override :super_sidebar_context_header
def super_sidebar_context_header
@super_sidebar_context_header ||= {
title: aria_label
}
end
def add_menus
add_menu(Sidebars::Admin::Menus::AdminOverviewMenu.new(context))
add_menu(Sidebars::Admin::Menus::CiCdMenu.new(context))
add_menu(Sidebars::Admin::Menus::AnalyticsMenu.new(context))
add_menu(Sidebars::Admin::Menus::MonitoringMenu.new(context))
add_menu(Sidebars::Admin::Menus::MessagesMenu.new(context))
add_menu(Sidebars::Admin::Menus::SystemHooksMenu.new(context))
add_menu(Sidebars::Admin::Menus::ApplicationsMenu.new(context))
add_menu(Sidebars::Admin::Menus::AbuseReportsMenu.new(context))
add_menu(Sidebars::Admin::Menus::KubernetesMenu.new(context))
add_menu(Sidebars::Admin::Menus::SpamLogsMenu.new(context))
add_menu(Sidebars::Admin::Menus::DeployKeysMenu.new(context))
add_menu(Sidebars::Admin::Menus::LabelsMenu.new(context))
add_menu(Sidebars::Admin::Menus::AdminSettingsMenu.new(context))
end
end
end
end
Sidebars::Admin::Panel.prepend_mod_with('Sidebars::Admin::Panel')
|