summaryrefslogtreecommitdiff
path: root/app/views/admin/application_settings/_background_jobs.html.haml
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-04-02 08:16:45 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-04-02 08:16:45 +0000
commit377a26446f4b88bc265e5bfc883331afdf891166 (patch)
treef2d96d4b0a1b72b41b8321fa740a260c4fbb7ff2 /app/views/admin/application_settings/_background_jobs.html.haml
parent2aa6bf7289fb4942c379e13fa413051dda099da3 (diff)
parente0a73d70f940b80839ed593b97b9f7a5fb71b434 (diff)
downloadgitlab-ce-377a26446f4b88bc265e5bfc883331afdf891166.tar.gz
Merge branch 'dz-improve-app-settings-3' into 'master'
Redesign application settings to match project settings (part 3) See merge request gitlab-org/gitlab-ce!18056
Diffstat (limited to 'app/views/admin/application_settings/_background_jobs.html.haml')
-rw-r--r--app/views/admin/application_settings/_background_jobs.html.haml30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/views/admin/application_settings/_background_jobs.html.haml b/app/views/admin/application_settings/_background_jobs.html.haml
new file mode 100644
index 00000000000..8198a822a10
--- /dev/null
+++ b/app/views/admin/application_settings/_background_jobs.html.haml
@@ -0,0 +1,30 @@
+= form_for @application_setting, url: admin_application_settings_path, html: { class: 'form-horizontal fieldset-form' } do |f|
+ = form_errors(@application_setting)
+
+ %fieldset
+ %p
+ These settings require a
+ = link_to 'restart', help_page_path('administration/restart_gitlab')
+ to take effect.
+ .form-group
+ .col-sm-offset-2.col-sm-10
+ .checkbox
+ = f.label :sidekiq_throttling_enabled do
+ = f.check_box :sidekiq_throttling_enabled
+ Enable Sidekiq Job Throttling
+ .help-block
+ Limit the amount of resources slow running jobs are assigned.
+ .form-group
+ = f.label :sidekiq_throttling_queues, 'Sidekiq queues to throttle', class: 'control-label col-sm-2'
+ .col-sm-10
+ = f.select :sidekiq_throttling_queues, sidekiq_queue_options_for_select, { include_hidden: false }, multiple: true, class: 'select2 select-wide', data: { field: 'sidekiq_throttling_queues' }
+ .help-block
+ Choose which queues you wish to throttle.
+ .form-group
+ = f.label :sidekiq_throttling_factor, 'Throttling Factor', class: 'control-label col-sm-2'
+ .col-sm-10
+ = f.number_field :sidekiq_throttling_factor, class: 'form-control', min: '0.01', max: '0.99', step: '0.01'
+ .help-block
+ The factor by which the queues should be throttled. A value between 0.0 and 1.0, exclusive.
+
+ = f.submit 'Save changes', class: "btn btn-success"