diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /lib/sidebars/projects | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'lib/sidebars/projects')
-rw-r--r-- | lib/sidebars/projects/menus/analytics_menu.rb | 2 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/ci_cd_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/deployments_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/infrastructure_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/issues_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/learn_gitlab_menu.rb | 7 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/monitor_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/packages_registries_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/project_information_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/repository_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/security_compliance_menu.rb | 5 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/settings_menu.rb | 19 |
12 files changed, 18 insertions, 55 deletions
diff --git a/lib/sidebars/projects/menus/analytics_menu.rb b/lib/sidebars/projects/menus/analytics_menu.rb index 29fd0609596..b13b25d1cfe 100644 --- a/lib/sidebars/projects/menus/analytics_menu.rb +++ b/lib/sidebars/projects/menus/analytics_menu.rb @@ -21,7 +21,7 @@ module Sidebars def link return cycle_analytics_menu_item.link if cycle_analytics_menu_item.render? - renderable_items.first.link + super end override :extra_container_html_options diff --git a/lib/sidebars/projects/menus/ci_cd_menu.rb b/lib/sidebars/projects/menus/ci_cd_menu.rb index f85a9faacd3..67e4209c382 100644 --- a/lib/sidebars/projects/menus/ci_cd_menu.rb +++ b/lib/sidebars/projects/menus/ci_cd_menu.rb @@ -15,11 +15,6 @@ module Sidebars add_item(pipeline_schedules_menu_item) end - override :link - def link - project_pipelines_path(context.project) - end - override :extra_container_html_options def extra_container_html_options { diff --git a/lib/sidebars/projects/menus/deployments_menu.rb b/lib/sidebars/projects/menus/deployments_menu.rb index fa6482562e8..110d78367b9 100644 --- a/lib/sidebars/projects/menus/deployments_menu.rb +++ b/lib/sidebars/projects/menus/deployments_menu.rb @@ -13,11 +13,6 @@ module Sidebars true end - override :link - def link - renderable_items.first.link - end - override :extra_container_html_options def extra_container_html_options { diff --git a/lib/sidebars/projects/menus/infrastructure_menu.rb b/lib/sidebars/projects/menus/infrastructure_menu.rb index aad1ce60d0e..e26bb2237e6 100644 --- a/lib/sidebars/projects/menus/infrastructure_menu.rb +++ b/lib/sidebars/projects/menus/infrastructure_menu.rb @@ -15,11 +15,6 @@ module Sidebars true end - override :link - def link - renderable_items.first.link - end - override :extra_container_html_options def extra_container_html_options { diff --git a/lib/sidebars/projects/menus/issues_menu.rb b/lib/sidebars/projects/menus/issues_menu.rb index fd57f21db88..3774bec2f13 100644 --- a/lib/sidebars/projects/menus/issues_menu.rb +++ b/lib/sidebars/projects/menus/issues_menu.rb @@ -18,11 +18,6 @@ module Sidebars true end - override :link - def link - project_issues_path(context.project) - end - override :extra_container_html_options def extra_container_html_options { diff --git a/lib/sidebars/projects/menus/learn_gitlab_menu.rb b/lib/sidebars/projects/menus/learn_gitlab_menu.rb index f29f4a6eed6..16335f5b076 100644 --- a/lib/sidebars/projects/menus/learn_gitlab_menu.rb +++ b/lib/sidebars/projects/menus/learn_gitlab_menu.rb @@ -23,7 +23,7 @@ module Sidebars override :has_pill? def has_pill? - context.learn_gitlab_experiment_enabled + context.learn_gitlab_enabled end override :pill_count @@ -40,8 +40,7 @@ module Sidebars { class: 'home', data: { - track_label: 'learn_gitlab', - track_property: context.learn_gitlab_experiment_tracking_category + track_label: 'learn_gitlab' } } end @@ -53,7 +52,7 @@ module Sidebars override :render? def render? - context.learn_gitlab_experiment_enabled + context.learn_gitlab_enabled end end end diff --git a/lib/sidebars/projects/menus/monitor_menu.rb b/lib/sidebars/projects/menus/monitor_menu.rb index 0d7e0776d5b..59554726263 100644 --- a/lib/sidebars/projects/menus/monitor_menu.rb +++ b/lib/sidebars/projects/menus/monitor_menu.rb @@ -19,11 +19,6 @@ module Sidebars true end - override :link - def link - renderable_items.first&.link - end - override :extra_container_html_options def extra_container_html_options { diff --git a/lib/sidebars/projects/menus/packages_registries_menu.rb b/lib/sidebars/projects/menus/packages_registries_menu.rb index d49bb680853..f5f0da2992e 100644 --- a/lib/sidebars/projects/menus/packages_registries_menu.rb +++ b/lib/sidebars/projects/menus/packages_registries_menu.rb @@ -13,11 +13,6 @@ module Sidebars true end - override :link - def link - renderable_items.first.link - end - override :title def title _('Packages & Registries') diff --git a/lib/sidebars/projects/menus/project_information_menu.rb b/lib/sidebars/projects/menus/project_information_menu.rb index a5f06ebea20..44b94ee3522 100644 --- a/lib/sidebars/projects/menus/project_information_menu.rb +++ b/lib/sidebars/projects/menus/project_information_menu.rb @@ -13,11 +13,6 @@ module Sidebars true end - override :link - def link - renderable_items.first.link - end - override :extra_container_html_options def extra_container_html_options { class: 'shortcuts-project-information' } diff --git a/lib/sidebars/projects/menus/repository_menu.rb b/lib/sidebars/projects/menus/repository_menu.rb index a784aecc3dc..0a295f0f618 100644 --- a/lib/sidebars/projects/menus/repository_menu.rb +++ b/lib/sidebars/projects/menus/repository_menu.rb @@ -20,11 +20,6 @@ module Sidebars true end - override :link - def link - project_tree_path(context.project) - end - override :extra_container_html_options def extra_container_html_options { diff --git a/lib/sidebars/projects/menus/security_compliance_menu.rb b/lib/sidebars/projects/menus/security_compliance_menu.rb index 5616b466560..9367514cdca 100644 --- a/lib/sidebars/projects/menus/security_compliance_menu.rb +++ b/lib/sidebars/projects/menus/security_compliance_menu.rb @@ -15,11 +15,6 @@ module Sidebars true end - override :link - def link - renderable_items.first&.link - end - override :title def title _('Security & Compliance') diff --git a/lib/sidebars/projects/menus/settings_menu.rb b/lib/sidebars/projects/menus/settings_menu.rb index 250143df649..6439c97d0bc 100644 --- a/lib/sidebars/projects/menus/settings_menu.rb +++ b/lib/sidebars/projects/menus/settings_menu.rb @@ -17,15 +17,11 @@ module Sidebars add_item(monitor_menu_item) add_item(pages_menu_item) add_item(packages_and_registries_menu_item) + add_item(usage_quotas_menu_item) true end - override :link - def link - edit_project_path(context.project) - end - override :title def title _('Settings') @@ -146,6 +142,19 @@ module Sidebars item_id: :packages_and_registries ) end + + def usage_quotas_menu_item + unless Feature.enabled?(:project_storage_ui, context.project&.group, default_enabled: :yaml) + return ::Sidebars::NilMenuItem.new(item_id: :usage_quotas) + end + + ::Sidebars::MenuItem.new( + title: s_('UsageQuota|Usage Quotas'), + link: project_usage_quotas_path(context.project), + active_routes: { path: 'usage_quotas#index' }, + item_id: :usage_quotas + ) + end end end end |