diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-04 00:11:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-04 00:11:13 +0300 |
commit | 63b3a14f15ee5c202d78b7bd72030f4f437ef982 (patch) | |
tree | 7994560f5a6bc1d421ce0fe395031e52d2b4719a /app/helpers | |
parent | 9578c9f9e88421a5dc4d9215f40d932bd30cbabc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 551e08d1e31..244238e246d 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -37,8 +37,13 @@ module ApplicationSettingsHelper end def storage_weights - Gitlab.config.repositories.storages.keys.each_with_object(OpenStruct.new) do |storage, weights| - weights[storage.to_sym] = @application_setting.repository_storages_weighted[storage] || 0 + 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 |