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/application_settings_helper.rb | |
parent | 6cf1f4c521a621fa2b4dc1735bf5a8c2846f7e6a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/application_settings_helper.rb')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 11 |
1 files changed, 11 insertions, 0 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 |