_form.html.haml 38.3 KB
Newer Older
1
= form_for @application_setting, url: admin_application_settings_path, html: { class: 'form-horizontal fieldset-form' } do |f|
2
  = form_errors(@application_setting)
3

4
  %fieldset
5
    %legend Visibility and Access Controls
6
    .form-group
7 8 9
      = f.label :default_branch_protection, class: 'control-label col-sm-2'
      .col-sm-10
        = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
10
    .form-group.visibility-level-setting
11 12
      = f.label :default_project_visibility, class: 'control-label col-sm-2'
      .col-sm-10
13
        = render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: Project.new)
14
    .form-group.visibility-level-setting
15 16
      = f.label :default_snippet_visibility, class: 'control-label col-sm-2'
      .col-sm-10
17
        = render('shared/visibility_radios', model_method: :default_snippet_visibility, form: f, selected_level: @application_setting.default_snippet_visibility, form_model: ProjectSnippet.new)
18
    .form-group.visibility-level-setting
19 20 21
      = f.label :default_group_visibility, class: 'control-label col-sm-2'
      .col-sm-10
        = render('shared/visibility_radios', model_method: :default_group_visibility, form: f, selected_level: @application_setting.default_group_visibility, form_model: Group.new)
22 23 24
    .form-group
      = f.label :restricted_visibility_levels, class: 'control-label col-sm-2'
      .col-sm-10
25 26 27
        - checkbox_name = 'application_setting[restricted_visibility_levels][]'
        = hidden_field_tag(checkbox_name)
        - restricted_level_checkboxes('restricted-visibility-help', checkbox_name).each do |level|
28
          .checkbox
29
            = level
30 31
        %span.help-block#restricted-visibility-help
          Selected levels cannot be used by non-admin users for projects or snippets.
32
          If the public level is restricted, user profiles are only visible to logged in users.
33 34 35
    .form-group
      = f.label :import_sources, class: 'control-label col-sm-2'
      .col-sm-10
36 37
        - import_sources_checkboxes('import-sources-help').each do |source|
          .checkbox= source
38 39
        %span.help-block#import-sources-help
          Enabled sources for code import during project creation. OmniAuth must be configured for GitHub
40
          = link_to "(?)", help_page_path("integration/github")
41
          , Bitbucket
42
          = link_to "(?)", help_page_path("integration/bitbucket")
43
          and GitLab.com
44
          = link_to "(?)", help_page_path("integration/gitlab")
45

46 47 48 49 50 51
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :project_export_enabled do
            = f.check_box :project_export_enabled
            Project export enabled
52

53 54 55
    .form-group
      %label.control-label.col-sm-2 Enabled Git access protocols
      .col-sm-10
56
        = select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control')
57 58
        %span.help-block#clone-protocol-help
          Allow only the selected protocols to be used for Git access.
59

60 61 62 63 64 65
    - ApplicationSetting::SUPPORTED_KEY_TYPES.each do |type|
      - field_name = :"#{type}_key_restriction"
      .form-group
        = f.label field_name, "#{type.upcase} SSH keys", class: 'control-label col-sm-2'
        .col-sm-10
          = f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control'
66 67 68

  %fieldset
    %legend Account and Limit Settings
69
    .form-group
70 71 72 73 74
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :gravatar_enabled do
            = f.check_box :gravatar_enabled
            Gravatar enabled
75
    .form-group
76
      = f.label :default_projects_limit, class: 'control-label col-sm-2'
77 78
      .col-sm-10
        = f.number_field :default_projects_limit, class: 'form-control'
79
    .form-group
80
      = f.label :max_attachment_size, 'Maximum attachment size (MB)', class: 'control-label col-sm-2'
Vinnie Okada's avatar
Vinnie Okada committed
81
      .col-sm-10
82 83 84
        = f.number_field :max_attachment_size, class: 'form-control'
    .form-group
      = f.label :session_expire_delay, 'Session duration (minutes)', class: 'control-label col-sm-2'
Vinnie Okada's avatar
Vinnie Okada committed
85
      .col-sm-10
86 87
        = f.number_field :session_expire_delay, class: 'form-control'
        %span.help-block#session_expire_delay_help_block GitLab restart is required to apply changes
88
    .form-group
89
      = f.label :user_oauth_applications, 'User OAuth applications', class: 'control-label col-sm-2'
90
      .col-sm-10
91 92 93 94
        .checkbox
          = f.label :user_oauth_applications do
            = f.check_box :user_oauth_applications
            Allow users to register any application to use GitLab as an OAuth provider
95 96 97 98 99 100 101
    .form-group
      = f.label :user_default_external, 'New users set to external', class: 'control-label col-sm-2'
      .col-sm-10
        .checkbox
          = f.label :user_default_external do
            = f.check_box :user_default_external
            Newly registered users will by default be external
102 103

  %fieldset
104
    %legend Sign-up Restrictions
105 106 107
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
108 109 110
          = f.label :signup_enabled do
            = f.check_box :signup_enabled
            Sign-up enabled
111 112 113
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
114
          = f.label :send_user_confirmation_email do
115
            = f.check_box :send_user_confirmation_email
116
            Send confirmation email on sign-up
117
    .form-group
118
      = f.label :domain_whitelist, 'Whitelisted domains for sign-ups', class: 'control-label col-sm-2'
119
      .col-sm-10
120
        = f.text_area :domain_whitelist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8
121 122 123 124 125 126 127 128 129 130 131 132
        .help-block ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com
    .form-group
      = f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'control-label col-sm-2'
      .col-sm-10
        .checkbox
          = f.label :domain_blacklist_enabled do
            = f.check_box :domain_blacklist_enabled
            Enable domain blacklist for sign ups
    .form-group
      .col-sm-offset-2.col-sm-10
        .radio
          = label_tag :blacklist_type_file do
133
            = radio_button_tag :blacklist_type, :file
134 135 136 137
            .option-title
              Upload blacklist file
        .radio
          = label_tag :blacklist_type_raw do
138
            = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank?
139 140 141 142 143 144 145 146
            .option-title
              Enter blacklist manually
    .form-group.blacklist-file
      = f.label :domain_blacklist_file, 'Blacklist file', class: 'control-label col-sm-2'
      .col-sm-10
        = f.file_field :domain_blacklist_file, class: 'form-control', accept: '.txt,.conf'
        .help-block Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines or commas for multiple entries.
    .form-group.blacklist-raw
147
      = f.label :domain_blacklist, 'Blacklisted domains for sign-ups', class: 'control-label col-sm-2'
148
      .col-sm-10
149
        = f.text_area :domain_blacklist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8
150 151 152 153 154 155 156 157 158 159
        .help-block Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com

    .form-group
      = f.label :after_sign_up_text, class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_area :after_sign_up_text, class: 'form-control', rows: 4
        .help-block Markdown enabled

  %fieldset
    %legend Sign-in Restrictions
160 161 162
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
          = f.label :password_authentication_enabled_for_web do
            = f.check_box :password_authentication_enabled_for_web
            Password authentication enabled for web interface
            .help-block
              When disabled, an external authentication provider must be used.
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :password_authentication_enabled_for_git do
            = f.check_box :password_authentication_enabled_for_git
            Password authentication enabled for Git over HTTP(S)
            .help-block
              When disabled, a Personal Access Token
              - if Gitlab::LDAP::Config.enabled?
                or LDAP password
              must be used to authenticate.
179
    - if omniauth_enabled? && button_based_providers.any?
180
      .form-group
181
        = f.label :enabled_oauth_sign_in_sources, 'Enabled OAuth sign-in sources', class: 'control-label col-sm-2'
182
        .col-sm-10
183
          .btn-group{ data: { toggle: 'buttons' } }
184
            - oauth_providers_checkboxes.each do |source|
185
              = source
186
    .form-group
187
      = f.label :two_factor_authentication, 'Two-factor authentication', class: 'control-label col-sm-2'
188 189 190 191
      .col-sm-10
        .checkbox
          = f.label :require_two_factor_authentication do
            = f.check_box :require_two_factor_authentication
192
            Require all users to setup Two-factor authentication
193
    .form-group
194
      = f.label :two_factor_authentication, 'Two-factor grace period (hours)', class: 'control-label col-sm-2'
195 196 197
      .col-sm-10
        = f.number_field :two_factor_grace_period, min: 0, class: 'form-control', placeholder: '0'
        .help-block Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication
198
    .form-group
199
      = f.label :home_page_url, 'Home page URL', class: 'control-label col-sm-2'
200
      .col-sm-10
201 202
        = f.text_field :home_page_url, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'home_help_block'
        %span.help-block#home_help_block We will redirect non-logged in users to this page
203 204 205 206 207
    .form-group
      = f.label :after_sign_out_path, class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :after_sign_out_path, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'after_sign_out_path_help_block'
        %span.help-block#after_sign_out_path_help_block We will redirect users to this page after they sign out
208
    .form-group
209
      = f.label :sign_in_text, class: 'control-label col-sm-2'
210
      .col-sm-10
211 212
        = f.text_area :sign_in_text, class: 'form-control', rows: 4
        .help-block Markdown enabled
213 214 215

  %fieldset
    %legend Help Page
216 217 218 219 220
    .form-group
      = f.label :help_page_text, class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_area :help_page_text, class: 'form-control', rows: 4
        .help-block Markdown enabled
221 222 223 224 225 226 227 228 229 230 231
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :help_page_hide_commercial_content do
            = f.check_box :help_page_hide_commercial_content
            Hide marketing-related entries from help
    .form-group
      = f.label :help_page_support_url, 'Support page URL', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :help_page_support_url, class: 'form-control', placeholder: 'http://company.example.com/getting-help', :'aria-describedby' => 'support_help_block'
        %span.help-block#support_help_block Alternate support URL for help page
232

Kamil Trzcinski's avatar
Kamil Trzcinski committed
233 234 235 236 237 238
  %fieldset
    %legend Pages
    .form-group
      = f.label :max_pages_size, 'Maximum size of pages (MB)', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :max_pages_size, class: 'form-control'
239
        .help-block 0 for unlimited
Kamil Trzcinski's avatar
Kamil Trzcinski committed
240

241
  %fieldset
242
    %legend Continuous Integration and Deployment
243 244 245 246 247
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :auto_devops_enabled do
            = f.check_box :auto_devops_enabled
248 249 250
            Enabled Auto DevOps (Beta) for projects by default
        .help-block
          It will automatically build, test, and deploy applications based on a predefined CI/CD configuration
Zeger-Jan van de Weg's avatar
Zeger-Jan van de Weg committed
251 252
          = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md')

253 254 255 256 257
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :shared_runners_enabled do
            = f.check_box :shared_runners_enabled
Steffen Köhler's avatar
Steffen Köhler committed
258
            Enable shared runners for new projects
259 260 261 262 263
    .form-group
      = f.label :shared_runners_text, class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_area :shared_runners_text, class: 'form-control', rows: 4
        .help-block Markdown enabled
Kamil Trzcinski's avatar
Kamil Trzcinski committed
264 265 266 267
    .form-group
      = f.label :max_artifacts_size, 'Maximum artifacts size (MB)', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :max_artifacts_size, class: 'form-control'
268
        .help-block
269
          Set the maximum file size for each job's artifacts
270
          = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size')
271
    .form-group
272
      = f.label :default_artifacts_expire_in, 'Default artifacts expiration', class: 'control-label col-sm-2'
273
      .col-sm-10
274
        = f.text_field :default_artifacts_expire_in, class: 'form-control'
275
        .help-block
276 277 278
          Set the default expiration time for each job's artifacts.
          0 for unlimited.
          = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration')
Kamil Trzcinski's avatar
Kamil Trzcinski committed
279

280 281 282 283 284 285 286 287
  - if Gitlab.config.registry.enabled
    %fieldset
      %legend Container Registry
      .form-group
        = f.label :container_registry_token_expire_delay, 'Authorization token duration (minutes)', class: 'control-label col-sm-2'
        .col-sm-10
          = f.number_field :container_registry_token_expire_delay, class: 'form-control'

288
  %fieldset
289
    %legend Metrics - Influx
290
    %p
291
      Setup InfluxDB to measure a wide variety of statistics like the time spent
292 293 294 295
      in running SQL queries. These settings require a
      = link_to 'restart', help_page_path('administration/restart_gitlab')
      to take effect.
      = link_to icon('question-circle'), help_page_path('administration/monitoring/performance/introduction')
296 297 298 299 300 301 302 303 304 305 306
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :metrics_enabled do
            = f.check_box :metrics_enabled
            Enable InfluxDB Metrics
    .form-group
      = f.label :metrics_host, 'InfluxDB host', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :metrics_host, class: 'form-control', placeholder: 'influxdb.example.com'
    .form-group
307
      = f.label :metrics_port, 'InfluxDB port', class: 'control-label col-sm-2'
308
      .col-sm-10
309
        = f.text_field :metrics_port, class: 'form-control', placeholder: '8089'
310
        .help-block
311 312 313 314
          The UDP port to use for connecting to InfluxDB. InfluxDB requires that
          your server configuration specifies a database to store data in when
          sending messages to this port, without it metrics data will not be
          saved.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
    .form-group
      = f.label :metrics_pool_size, 'Connection pool size', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_pool_size, class: 'form-control'
        .help-block
          The amount of InfluxDB connections to open. Connections are opened
          lazily. Users using multi-threaded application servers should ensure
          enough connections are available (at minimum the amount of application
          server threads).
    .form-group
      = f.label :metrics_timeout, 'Connection timeout', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_timeout, class: 'form-control'
        .help-block
          The amount of seconds after which an InfluxDB connection will time
          out.
    .form-group
      = f.label :metrics_method_call_threshold, 'Method Call Threshold (ms)', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_method_call_threshold, class: 'form-control'
        .help-block
          A method call is only tracked when it takes longer to complete than
          the given amount of milliseconds.
338 339 340 341 342 343 344
    .form-group
      = f.label :metrics_sample_interval, 'Sampler Interval (sec)', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_sample_interval, class: 'form-control'
        .help-block
          The sampling interval in seconds. Sampled data includes memory usage,
          retained Ruby objects, file descriptors and so on.
345 346 347 348 349 350 351
    .form-group
      = f.label :metrics_packet_size, 'Metrics per packet', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_packet_size, class: 'form-control'
        .help-block
          The amount of points to store in a single UDP packet. More points
          results in fewer but larger UDP packets being sent.
352

353 354 355
  %fieldset
    %legend Metrics - Prometheus
    %p
356 357 358
      Enable a Prometheus metrics endpoint at
      %code= metrics_path
      to expose a variety of statistics on the health and performance of GitLab. Additional information on authenticating and connecting to the metrics endpoint is available
359 360
      = link_to 'here', admin_health_check_path
      \. This setting requires a
361 362
      = link_to 'restart', help_page_path('administration/restart_gitlab')
      to take effect.
363
      = link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/index')
364 365 366 367 368 369
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :prometheus_metrics_enabled do
            = f.check_box :prometheus_metrics_enabled
            Enable Prometheus Metrics
370 371 372 373 374 375 376
          - unless Gitlab::Metrics.metrics_folder_present?
            .help-block
              %strong.cred WARNING:
              Environment variable
              %code prometheus_multiproc_dir
              does not exist or is not pointing to a valid directory.
              = link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/gitlab_metrics', anchor: 'metrics-shared-directory')
377

378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393
  %fieldset
    %legend Profiling - Performance Bar
    %p
      Enable the Performance Bar for a given group.
      = link_to icon('question-circle'), help_page_path('administration/monitoring/performance/performance_bar')
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :performance_bar_enabled do
            = f.check_box :performance_bar_enabled
            Enable the Performance Bar
    .form-group
      = f.label :performance_bar_allowed_group_id, 'Allowed group', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :performance_bar_allowed_group_id, class: 'form-control', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path

394 395 396
  %fieldset
    %legend Background Jobs
    %p
397 398 399
      These settings require a
      = link_to 'restart', help_page_path('administration/restart_gitlab')
      to take effect.
400 401 402 403 404 405 406 407
    .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.
408 409 410 411 412 413 414 415 416
    .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
417
        = f.number_field :sidekiq_throttling_factor, class: 'form-control', min: '0.01', max: '0.99', step: '0.01'
418
        .help-block
419
          The factor by which the queues should be throttled. A value between 0.0 and 1.0, exclusive.
420

421 422 423 424 425 426 427 428
  %fieldset
    %legend Spam and Anti-bot Protection
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :recaptcha_enabled do
            = f.check_box :recaptcha_enabled
            Enable reCAPTCHA
429
          %span.help-block#recaptcha_help_block Helps prevent bots from creating accounts
430 431 432 433 434 435

    .form-group
      = f.label :recaptcha_site_key, 'reCAPTCHA Site Key', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :recaptcha_site_key, class: 'form-control'
        .help-block
436
          Generate site and private keys at
437
          %a{ href: 'http://www.google.com/recaptcha', target: 'blank' } http://www.google.com/recaptcha
438

439 440 441 442 443
    .form-group
      = f.label :recaptcha_private_key, 'reCAPTCHA Private Key', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :recaptcha_private_key, class: 'form-control'

444 445 446 447 448 449 450 451 452 453 454 455 456 457
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :akismet_enabled do
            = f.check_box :akismet_enabled
            Enable Akismet
          %span.help-block#akismet_help_block Helps prevent bots from creating issues

    .form-group
      = f.label :akismet_api_key, 'Akismet API Key', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :akismet_api_key, class: 'form-control'
        .help-block
          Generate API key at
458
          %a{ href: 'http://www.akismet.com', target: 'blank' } http://www.akismet.com
459

Pawel Chojnacki's avatar
Pawel Chojnacki committed
460 461 462 463 464 465
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :unique_ips_limit_enabled do
            = f.check_box :unique_ips_limit_enabled
            Limit sign in from multiple ips
466 467
          %span.help-block#unique_ip_help_block
            Helps prevent malicious users hide their activity
Pawel Chojnacki's avatar
Pawel Chojnacki committed
468 469 470 471 472 473 474 475 476 477 478 479 480

    .form-group
      = f.label :unique_ips_limit_per_user, 'IPs per user', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :unique_ips_limit_per_user, class: 'form-control'
        .help-block
          Maximum number of unique IPs per user

    .form-group
      = f.label :unique_ips_limit_time_window, 'IP expiration time', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :unique_ips_limit_time_window, class: 'form-control'
        .help-block
481
          How many seconds an IP will be counted towards the limit
Pawel Chojnacki's avatar
Pawel Chojnacki committed
482

483 484 485 486 487 488 489 490 491
  %fieldset
    %legend Abuse reports
    .form-group
      = f.label :admin_notification_email, 'Abuse reports notification email', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :admin_notification_email, class: 'form-control'
        .help-block
          Abuse reports will be sent to this address if it is set. Abuse reports are always available in the admin area.

Jeroen Nijhof's avatar
Jeroen Nijhof committed
492 493 494 495 496 497 498 499
  %fieldset
    %legend Error Reporting and Logging
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :sentry_enabled do
            = f.check_box :sentry_enabled
            Enable Sentry
500
          .help-block
501
            %p This setting requires a restart to take effect.
502
            Sentry is an error reporting and logging tool which is currently not shipped with GitLab, get it here:
503
            %a{ href: 'https://getsentry.com', target: '_blank', rel: 'noopener noreferrer' } https://getsentry.com
Jeroen Nijhof's avatar
Jeroen Nijhof committed
504 505 506 507 508 509

    .form-group
      = f.label :sentry_dsn, 'Sentry DSN', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :sentry_dsn, class: 'form-control'

510 511 512 513 514 515 516 517 518 519 520
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :clientside_sentry_enabled do
            = f.check_box :clientside_sentry_enabled
            Enable Clientside Sentry
          .help-block
            Sentry can also be used for reporting and logging clientside exceptions.
            %a{ href: 'https://sentry.io/for/javascript/', target: '_blank', rel: 'noopener noreferrer' } https://sentry.io/for/javascript/

    .form-group
521
      = f.label :clientside_sentry_dsn, 'Clientside Sentry DSN', class: 'control-label col-sm-2'
522
      .col-sm-10
523
        = f.text_field :clientside_sentry_dsn, class: 'form-control'
524

525 526
  %fieldset
    %legend Repository Storage
527 528 529 530 531 532 533
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :hashed_storage_enabled do
            = f.check_box :hashed_storage_enabled
            Create new projects using hashed storage paths
          .help-block
534
            Enable immutable, hash-based paths and repository names to store repositories on disk. This prevents
535 536
            repositories from having to be moved or renamed when the Project URL changes and may improve disk I/O performance.
            %em (EXPERIMENTAL)
537
    .form-group
538
      = f.label :repository_storages, 'Storage paths for new projects', class: 'control-label col-sm-2'
539
      .col-sm-10
540
        = f.select :repository_storages, repository_storages_options_for_select, {include_hidden: false}, multiple: true, class: 'form-control'
541
        .help-block
542 543 544
          Manage repository storage paths. Learn more in the
          = succeed "." do
            = link_to "repository storages documentation", help_page_path("administration/repository_storages")
545

546 547
  %fieldset
    %legend Git Storage Circuitbreaker settings
548 549 550 551 552 553
    .form-group
      = f.label :circuitbreaker_check_interval, _('Check interval'), class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :circuitbreaker_check_interval, class: 'form-control'
        .help-block
          = circuitbreaker_check_interval_help_text
554
    .form-group
555
      = f.label :circuitbreaker_access_retries, _('Number of access attempts'), class: 'control-label col-sm-2'
556
      .col-sm-10
557
        = f.number_field :circuitbreaker_access_retries, class: 'form-control'
558
        .help-block
559 560 561 562 563 564 565
          = circuitbreaker_access_retries_help_text
    .form-group
      = f.label :circuitbreaker_storage_timeout, _('Seconds to wait for a storage access attempt'), class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :circuitbreaker_storage_timeout, class: 'form-control'
        .help-block
          = circuitbreaker_storage_timeout_help_text
566
    .form-group
567
      = f.label :circuitbreaker_failure_count_threshold, _('Maximum git storage failures'), class: 'control-label col-sm-2'
568
      .col-sm-10
569
        = f.number_field :circuitbreaker_failure_count_threshold, class: 'form-control'
570
        .help-block
571
          = circuitbreaker_failure_count_help_text
572
    .form-group
573
      = f.label :circuitbreaker_failure_reset_time, _('Seconds before reseting failure information'), class: 'control-label col-sm-2'
574
      .col-sm-10
575
        = f.number_field :circuitbreaker_failure_reset_time, class: 'form-control'
576
        .help-block
577
          = circuitbreaker_failure_reset_time_help_text
578

579 580 581 582 583 584 585 586 587
  %fieldset
    %legend Repository Checks
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :repository_checks_enabled do
            = f.check_box :repository_checks_enabled
            Enable Repository Checks
          .help-block
588
            GitLab will periodically run
589 590
            %a{ href: 'https://www.kernel.org/pub/software/scm/git/docs/git-fsck.html', target: 'blank' } 'git fsck'
            in all project and wiki repositories to look for silent disk corruption issues.
591 592 593 594
    .form-group
      .col-sm-offset-2.col-sm-10
        = link_to 'Clear all repository checks', clear_repository_check_states_admin_application_settings_path, data: { confirm: 'This will clear repository check states for ALL projects in the database. This cannot be undone. Are you sure?' }, method: :put, class: "btn btn-sm btn-remove"
        .help-block
Jacob Vosmaer's avatar
Jacob Vosmaer committed
595
          If you got a lot of false alarms from repository checks you can choose to clear all repository check information from the database.
596

597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
  - if koding_enabled?
    %fieldset
      %legend Koding
      .form-group
        .col-sm-offset-2.col-sm-10
          .checkbox
            = f.label :koding_enabled do
              = f.check_box :koding_enabled
              Enable Koding
          .help-block
            Koding integration has been deprecated since GitLab 10.0. If you disable your Koding integration, you will not be able to enable it again.
      .form-group
        = f.label :koding_url, 'Koding URL', class: 'control-label col-sm-2'
        .col-sm-10
          = f.text_field :koding_url, class: 'form-control', placeholder: 'http://gitlab.your-koding-instance.com:8090'
          .help-block
            Koding has integration enabled out of the box for the
            %strong gitlab
            team, and you need to provide that team's URL here. Learn more in the
            = succeed "." do
              = link_to "Koding administration documentation", help_page_path("administration/integration/koding")
618

619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635
  %fieldset
    %legend PlantUML
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :plantuml_enabled do
            = f.check_box :plantuml_enabled
            Enable PlantUML
    .form-group
      = f.label :plantuml_url, 'PlantUML URL', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :plantuml_url, class: 'form-control', placeholder: 'http://gitlab.your-plantuml-instance.com:8080'
        .help-block
          Allow rendering of
          = link_to "PlantUML", "http://plantuml.com"
          diagrams in Asciidoc documents using an external PlantUML service.

636
  %fieldset
637
    %legend#usage-statistics Usage statistics
638 639 640 641 642 643 644 645
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :version_check_enabled do
            = f.check_box :version_check_enabled
            Version check enabled
          .help-block
            Let GitLab inform you when an update is available.
Sean McGivern's avatar
Sean McGivern committed
646 647
    .form-group
      .col-sm-offset-2.col-sm-10
648
        - can_be_configured = @application_setting.usage_ping_can_be_configured?
Sean McGivern's avatar
Sean McGivern committed
649 650
        .checkbox
          = f.label :usage_ping_enabled do
651
            = f.check_box :usage_ping_enabled, disabled: !can_be_configured
Sean McGivern's avatar
Sean McGivern committed
652
            Usage ping enabled
653
            = link_to icon('question-circle'), help_page_path("user/admin_area/settings/usage_statistics", anchor: "usage-ping")
654
          .help-block
655 656 657 658 659 660 661 662 663 664 665
            - if can_be_configured
              Every week GitLab will report license usage back to GitLab, Inc.
              Disable this option if you do not want this to occur. To see the
              JSON payload that will be sent, visit the
              = succeed '.' do
                = link_to "Cohorts page", admin_cohorts_path(anchor: 'usage-ping')
            - else
              The usage ping is disabled, and cannot be configured through this
              form. For more information, see the documentation on
              = succeed '.' do
                = link_to 'deactivating the usage ping', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'deactivate-the-usage-ping')
666 667 668 669 670 671 672 673 674 675 676 677 678

  %fieldset
    %legend Email
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :email_author_in_body do
            = f.check_box :email_author_in_body
            Include author name in notification email body
          .help-block
            Some email servers do not support overriding the email sender name.
            Enable this option to include the name of the author of the issue,
            merge request or comment in the email body instead.
679 680 681 682 683 684 685 686 687 688
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :html_emails_enabled do
            = f.check_box :html_emails_enabled
            Enable HTML emails
          .help-block
            By default GitLab sends emails in HTML and plain text formats so mail
            clients can choose what format to use. Disable this option if you only
            want to send emails in plain text format.
Jacob Vosmaer's avatar
Jacob Vosmaer committed
689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727
  %fieldset
    %legend Automatic Git repository housekeeping
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :housekeeping_enabled do
            = f.check_box :housekeeping_enabled
            Enable automatic repository housekeeping (git repack, git gc)
          .help-block
            If you keep automatic housekeeping disabled for a long time Git
            repository access on your GitLab server will become slower and your
            repositories will use more disk space. We recommend to always leave
            this enabled.
        .checkbox
          = f.label :housekeeping_bitmaps_enabled do
            = f.check_box :housekeeping_bitmaps_enabled
            Enable Git pack file bitmap creation
          .help-block
            Creating pack file bitmaps makes housekeeping take a little longer but
            bitmaps should accelerate 'git clone' performance.
    .form-group
      = f.label :housekeeping_incremental_repack_period, 'Incremental repack period', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :housekeeping_incremental_repack_period, class: 'form-control'
        .help-block
          Number of Git pushes after which an incremental 'git repack' is run.
    .form-group
      = f.label :housekeeping_full_repack_period, 'Full repack period', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :housekeeping_full_repack_period, class: 'form-control'
        .help-block
          Number of Git pushes after which a full 'git repack' is run.
    .form-group
      = f.label :housekeeping_gc_period, 'Git GC period', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :housekeeping_gc_period, class: 'form-control'
        .help-block
          Number of Git pushes after which 'git gc' is run.

728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751
  %fieldset
    %legend Gitaly Timeouts
    .form-group
      = f.label :gitaly_timeout_default, 'Default Timeout Period', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :gitaly_timeout_default, class: 'form-control'
        .help-block
          Timeout for Gitaly calls from the GitLab application (in seconds). This timeout is not enforced
          for git fetch/push operations or Sidekiq jobs.
    .form-group
      = f.label :gitaly_timeout_fast, 'Fast Timeout Period', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :gitaly_timeout_fast, class: 'form-control'
        .help-block
          Fast operation timeout (in seconds). Some Gitaly operations are expected to be fast.
          If they exceed this threshold, there may be a problem with a storage shard and 'failing fast'
          can help maintain the stability of the GitLab instance.
    .form-group
      = f.label :gitaly_timeout_medium, 'Medium Timeout Period', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :gitaly_timeout_medium, class: 'form-control'
        .help-block
          Medium operation timeout (in seconds). This should be a value between the Fast and the Default timeout.

752 753 754 755 756 757 758 759
  %fieldset
    %legend Web terminal
    .form-group
      = f.label :terminal_max_session_time, 'Max session time', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :terminal_max_session_time, class: 'form-control'
        .help-block
          Maximum time for web terminal websocket connection (in seconds).
760
          0 for unlimited.
761

762 763 764 765 766 767 768 769 770 771 772 773 774
  %fieldset
    %legend Real-time features
    .form-group
      = f.label :polling_interval_multiplier, 'Polling interval multiplier', class: 'control-label col-sm-2'
      .col-sm-10
        = f.text_field :polling_interval_multiplier, class: 'form-control'
        .help-block
          Change this value to influence how frequently the GitLab UI polls for updates.
          If you set the value to 2 all polling intervals are multiplied
          by 2, which means that polling happens half as frequently.
          The multiplier can also have a decimal value.
          The default value (1) is a reasonable choice for the majority of GitLab
          installations. Set to 0 to completely disable polling.
775
          = link_to icon('question-circle'), help_page_path('administration/polling')
776

Michael Kozono's avatar
Michael Kozono committed
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827
  %fieldset
    %legend User and IP Rate Limits
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :throttle_unauthenticated_enabled do
            = f.check_box :throttle_unauthenticated_enabled
            Enable unauthenticated request rate limit
          %span.help-block
            Helps reduce request volume (e.g. from crawlers or abusive bots)
    .form-group
      = f.label :throttle_unauthenticated_requests_per_period, 'Max requests per period per IP', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :throttle_unauthenticated_requests_per_period, class: 'form-control'
    .form-group
      = f.label :throttle_unauthenticated_period_in_seconds, 'Rate limit period in seconds', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :throttle_unauthenticated_period_in_seconds, class: 'form-control'
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :throttle_authenticated_api_enabled do
            = f.check_box :throttle_authenticated_api_enabled
            Enable authenticated API request rate limit
          %span.help-block
            Helps reduce request volume (e.g. from crawlers or abusive bots)
    .form-group
      = f.label :throttle_authenticated_api_requests_per_period, 'Max requests per period per user', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :throttle_authenticated_api_requests_per_period, class: 'form-control'
    .form-group
      = f.label :throttle_authenticated_api_period_in_seconds, 'Rate limit period in seconds', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :throttle_authenticated_api_period_in_seconds, class: 'form-control'
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :throttle_authenticated_web_enabled do
            = f.check_box :throttle_authenticated_web_enabled
            Enable authenticated web request rate limit
          %span.help-block
            Helps reduce request volume (e.g. from crawlers or abusive bots)
    .form-group
      = f.label :throttle_authenticated_web_requests_per_period, 'Max requests per period per user', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :throttle_authenticated_web_requests_per_period, class: 'form-control'
    .form-group
      = f.label :throttle_authenticated_web_period_in_seconds, 'Rate limit period in seconds', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :throttle_authenticated_web_period_in_seconds, class: 'form-control'

828
  .form-actions
829
    = f.submit 'Save', class: 'btn btn-save'