blob: e6e8e77a4488cbb1161a69bf4ce2d81d75a524a0 (
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
|
# frozen_string_literal: true
module Sidebars
module Admin
module Menus
class CiCdMenu < ::Sidebars::Admin::BaseMenu
override :configure_menu_items
def configure_menu_items
add_item(runners_menu_item)
add_item(jobs_menu_item)
true
end
override :title
def title
s_('Admin|CI/CD')
end
override :sprite_icon
def sprite_icon
'rocket'
end
private
def runners_menu_item
::Sidebars::MenuItem.new(
title: _('Runners'),
link: admin_runners_path,
active_routes: { controller: 'runners' },
item_id: :runners
)
end
def jobs_menu_item
::Sidebars::MenuItem.new(
title: _('Jobs'),
link: admin_jobs_path,
active_routes: { controller: 'jobs' },
item_id: :jobs
)
end
end
end
end
end
|