diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-12 16:35:59 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-16 15:00:47 +0200 |
commit | 8823125eab3b9698c7fabecff5479b96aaea360c (patch) | |
tree | 3afa3e3668e818dca29ccbf6ed49f3c1e1dc6f2d /app/helpers/application_settings_helper.rb | |
parent | d4bd322dc74dc6802416404c90b42abef5eb7acc (diff) | |
download | gitlab-ce-8823125eab3b9698c7fabecff5479b96aaea360c.tar.gz |
Allow configuring the circuitbreaker through the API and UIbvl-circuitbreaker-improvements
Diffstat (limited to 'app/helpers/application_settings_helper.rb')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 7bd34df5c95..1ee8911bb1a 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -108,6 +108,34 @@ module ApplicationSettingsHelper options_for_select(Sidekiq::Queue.all.map(&:name), @application_setting.sidekiq_throttling_queues) end + def circuitbreaker_failure_count_help_text + health_link = link_to(s_('AdminHealthPageLink|health page'), admin_health_check_path) + api_link = link_to(s_('CircuitBreakerApiLink|circuitbreaker api'), help_page_path("api/repository_storage_health")) + message = _("The number of failures of after which GitLab will completely "\ + "prevent access to the storage. The number of failures can be "\ + "reset in the admin interface: %{link_to_health_page} or using "\ + "the %{api_documentation_link}.") + message = message % { link_to_health_page: health_link, api_documentation_link: api_link } + + message.html_safe + end + + def circuitbreaker_failure_wait_time_help_text + _("When access to a storage fails. GitLab will prevent access to the "\ + "storage for the time specified here. This allows the filesystem to "\ + "recover. Repositories on failing shards are temporarly unavailable") + end + + def circuitbreaker_failure_reset_time_help_text + _("The time in seconds GitLab will keep failure information. When no "\ + "failures occur during this time, information about the mount is reset.") + end + + def circuitbreaker_storage_timeout_help_text + _("The time in seconds GitLab will try to access storage. After this time a "\ + "timeout error will be raised.") + end + def visible_attributes [ :admin_notification_email, @@ -116,6 +144,10 @@ module ApplicationSettingsHelper :akismet_api_key, :akismet_enabled, :auto_devops_enabled, + :circuitbreaker_failure_count_threshold, + :circuitbreaker_failure_reset_time, + :circuitbreaker_failure_wait_time, + :circuitbreaker_storage_timeout, :clientside_sentry_dsn, :clientside_sentry_enabled, :container_registry_token_expire_delay, |