diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-16 15:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-16 15:09:00 +0300 |
commit | 9bfdb5cf67ca45ac6d354e18168f5df12b60ccd2 (patch) | |
tree | 632218f5978fd547675f4b4e73dabcb22d62fc87 /app/helpers | |
parent | 6cf1f4c521a621fa2b4dc1735bf5a8c2846f7e6a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 11 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 38c4cccc417..e709d15a946 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -26,6 +26,17 @@ module ApplicationSettingsHelper end end + def storage_weights + ApplicationSetting.repository_storages_weighted_attributes.map do |attribute| + storage = attribute.to_s.delete_prefix('repository_storages_weighted_') + { + name: attribute, + label: storage, + value: @application_setting.repository_storages_weighted[storage] || 0 + } + end + end + def all_protocols_enabled? Gitlab::CurrentSettings.enabled_git_access_protocol.blank? end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index e36a8f36b5b..bda9a69d71f 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -734,7 +734,7 @@ module ProjectsHelper end def native_code_navigation_enabled?(project) - Feature.enabled?(:code_navigation, project) + Feature.enabled?(:code_navigation, project, default_enabled: true) end def show_visibility_confirm_modal?(project) |