Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-16 15:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-16 15:09:00 +0300
commit9bfdb5cf67ca45ac6d354e18168f5df12b60ccd2 (patch)
tree632218f5978fd547675f4b4e73dabcb22d62fc87 /app/helpers/application_settings_helper.rb
parent6cf1f4c521a621fa2b4dc1735bf5a8c2846f7e6a (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.rb11
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