diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-08 19:29:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-08 19:29:05 +0300 |
commit | fefc7abcfc24e13136cceb3e1b965c116fc7f493 (patch) | |
tree | 24ace4649a1ce2c749c7c0a9e012c7d5ea3270ce /lib/sidebars | |
parent | d7b53d074ba02eba2dbefcc20525924078ac331e (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-ee
Diffstat (limited to 'lib/sidebars')
-rw-r--r-- | lib/sidebars/admin/menus/monitoring_menu.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sidebars/admin/menus/monitoring_menu.rb b/lib/sidebars/admin/menus/monitoring_menu.rb index 2da56e87144..2cf21e1bf77 100644 --- a/lib/sidebars/admin/menus/monitoring_menu.rb +++ b/lib/sidebars/admin/menus/monitoring_menu.rb @@ -10,6 +10,7 @@ module Sidebars add_item(background_migrations_menu_item) add_item(background_jobs_menu_item) add_item(health_check_menu_item) + add_item(metrics_dashboard_menu_item) true end @@ -65,6 +66,18 @@ module Sidebars item_id: :health_check ) end + + def metrics_dashboard_menu_item + return ::Sidebars::NilMenuItem.new(item_id: :metrics_dashboard) unless + Gitlab::CurrentSettings.current_application_settings.grafana_enabled? + + ::Sidebars::MenuItem.new( + title: _('Metrics Dashboard'), + link: Gitlab::CurrentSettings.current_application_settings.grafana_url, + active_routes: { path: Gitlab::CurrentSettings.current_application_settings.grafana_url }, + item_id: :metrics_dashboard + ) + end end end end |