summaryrefslogtreecommitdiff
path: root/app/helpers/application_settings_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/application_settings_helper.rb')
-rw-r--r--app/helpers/application_settings_helper.rb9
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