diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /lib/sidebars/groups/menus/observability_menu.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'lib/sidebars/groups/menus/observability_menu.rb')
-rw-r--r-- | lib/sidebars/groups/menus/observability_menu.rb | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/sidebars/groups/menus/observability_menu.rb b/lib/sidebars/groups/menus/observability_menu.rb index 656142375af..d85efb1a002 100644 --- a/lib/sidebars/groups/menus/observability_menu.rb +++ b/lib/sidebars/groups/menus/observability_menu.rb @@ -6,9 +6,8 @@ module Sidebars class ObservabilityMenu < ::Sidebars::Menu override :configure_menu_items def configure_menu_items - add_item(dashboards_menu_item) add_item(explore_menu_item) - add_item(manage_menu_item) + add_item(datasources_menu_item) end override :title @@ -23,14 +22,14 @@ module Sidebars override :render? def render? - can?(context.current_user, :read_observability, context.group) + Gitlab::Observability.observability_enabled?(context.current_user, context.group) end private def dashboards_menu_item ::Sidebars::MenuItem.new( - title: _('Dashboards'), + title: s_('Observability|Dashboards'), link: group_observability_dashboards_path(context.group), active_routes: { path: 'groups/observability#dashboards' }, item_id: :dashboards @@ -39,16 +38,25 @@ module Sidebars def explore_menu_item ::Sidebars::MenuItem.new( - title: _('Explore'), + title: s_('Observability|Explore telemetry data'), link: group_observability_explore_path(context.group), active_routes: { path: 'groups/observability#explore' }, item_id: :explore ) end + def datasources_menu_item + ::Sidebars::MenuItem.new( + title: s_('Observability|Data sources'), + link: group_observability_datasources_path(context.group), + active_routes: { path: 'groups/observability#datasources' }, + item_id: :datasources + ) + end + def manage_menu_item ::Sidebars::MenuItem.new( - title: _('Manage Dashboards'), + title: s_('Observability|Manage dashboards'), link: group_observability_manage_path(context.group), active_routes: { path: 'groups/observability#manage' }, item_id: :manage |