summaryrefslogtreecommitdiff
path: root/lib/sidebars
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 15:40:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 15:40:28 +0000
commitb595cb0c1dec83de5bdee18284abe86614bed33b (patch)
tree8c3d4540f193c5ff98019352f554e921b3a41a72 /lib/sidebars
parent2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff)
downloadgitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'lib/sidebars')
-rw-r--r--lib/sidebars/groups/menus/packages_registries_menu.rb2
-rw-r--r--lib/sidebars/projects/menus/infrastructure_menu.rb10
-rw-r--r--lib/sidebars/projects/menus/learn_gitlab_menu.rb5
-rw-r--r--lib/sidebars/projects/menus/monitor_menu.rb32
-rw-r--r--lib/sidebars/projects/menus/packages_registries_menu.rb4
5 files changed, 15 insertions, 38 deletions
diff --git a/lib/sidebars/groups/menus/packages_registries_menu.rb b/lib/sidebars/groups/menus/packages_registries_menu.rb
index 4c21845ef18..fda90406e0a 100644
--- a/lib/sidebars/groups/menus/packages_registries_menu.rb
+++ b/lib/sidebars/groups/menus/packages_registries_menu.rb
@@ -54,7 +54,7 @@ module Sidebars
::Sidebars::MenuItem.new(
title: _('Harbor Registry'),
- link: group_harbor_registries_path(context.group),
+ link: group_harbor_repositories_path(context.group),
active_routes: { controller: 'groups/harbor/repositories' },
item_id: :harbor_registry
)
diff --git a/lib/sidebars/projects/menus/infrastructure_menu.rb b/lib/sidebars/projects/menus/infrastructure_menu.rb
index a98cc20d51a..1c04a7b117d 100644
--- a/lib/sidebars/projects/menus/infrastructure_menu.rb
+++ b/lib/sidebars/projects/menus/infrastructure_menu.rb
@@ -88,8 +88,14 @@ module Sidebars
::Sidebars::MenuItem.new(
title: _('Google Cloud'),
- link: project_google_cloud_index_path(context.project),
- active_routes: { controller: [:google_cloud, :service_accounts, :deployments, :gcp_regions] },
+ link: project_google_cloud_configuration_path(context.project),
+ active_routes: { controller: [
+ :configuration,
+ :service_accounts,
+ :databases,
+ :deployments,
+ :gcp_regions
+ ] },
item_id: :google_cloud
)
end
diff --git a/lib/sidebars/projects/menus/learn_gitlab_menu.rb b/lib/sidebars/projects/menus/learn_gitlab_menu.rb
index 5de70ea7d7f..d2bc2fa0681 100644
--- a/lib/sidebars/projects/menus/learn_gitlab_menu.rb
+++ b/lib/sidebars/projects/menus/learn_gitlab_menu.rb
@@ -29,7 +29,10 @@ module Sidebars
override :pill_count
def pill_count
strong_memoize(:pill_count) do
- percentage = LearnGitlab::Onboarding.new(context.project.namespace).completed_percentage
+ percentage = LearnGitlab::Onboarding.new(
+ context.project.namespace,
+ context.current_user
+ ).completed_percentage
"#{percentage}%"
end
diff --git a/lib/sidebars/projects/menus/monitor_menu.rb b/lib/sidebars/projects/menus/monitor_menu.rb
index c35bc1f5481..23e1a95c401 100644
--- a/lib/sidebars/projects/menus/monitor_menu.rb
+++ b/lib/sidebars/projects/menus/monitor_menu.rb
@@ -9,8 +9,6 @@ module Sidebars
return false unless context.project.feature_available?(:operations, context.current_user)
add_item(metrics_dashboard_menu_item)
- add_item(logs_menu_item)
- add_item(tracing_menu_item)
add_item(error_tracking_menu_item)
add_item(alert_management_menu_item)
add_item(incidents_menu_item)
@@ -57,36 +55,6 @@ module Sidebars
)
end
- def logs_menu_item
- if !Feature.enabled?(:monitor_logging, context.project) ||
- !can?(context.current_user, :read_environment, context.project) ||
- !can?(context.current_user, :read_pod_logs, context.project)
- return ::Sidebars::NilMenuItem.new(item_id: :logs)
- end
-
- ::Sidebars::MenuItem.new(
- title: _('Logs'),
- link: project_logs_path(context.project),
- active_routes: { path: 'logs#index' },
- item_id: :logs
- )
- end
-
- def tracing_menu_item
- if !Feature.enabled?(:monitor_tracing, context.project) ||
- !can?(context.current_user, :read_environment, context.project) ||
- !can?(context.current_user, :admin_project, context.project)
- return ::Sidebars::NilMenuItem.new(item_id: :tracing)
- end
-
- ::Sidebars::MenuItem.new(
- title: _('Tracing'),
- link: project_tracing_path(context.project),
- active_routes: { path: 'tracings#show' },
- item_id: :tracing
- )
- end
-
def error_tracking_menu_item
unless can?(context.current_user, :read_sentry_issue, context.project)
return ::Sidebars::NilMenuItem.new(item_id: :error_tracking)
diff --git a/lib/sidebars/projects/menus/packages_registries_menu.rb b/lib/sidebars/projects/menus/packages_registries_menu.rb
index d82a02a342f..914368e6fec 100644
--- a/lib/sidebars/projects/menus/packages_registries_menu.rb
+++ b/lib/sidebars/projects/menus/packages_registries_menu.rb
@@ -70,8 +70,8 @@ module Sidebars
::Sidebars::MenuItem.new(
title: _('Harbor Registry'),
- link: project_harbor_registry_index_path(context.project),
- active_routes: { controller: 'projects/harbor/repositories' },
+ link: project_harbor_repositories_path(context.project),
+ active_routes: { controller: :harbor_registry },
item_id: :harbor_registry
)
end