_form.html.haml 22.1 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 5 6 7 8 9 10 11
  - 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'

12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
  %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

28 29 30
  %fieldset
    %legend Background Jobs
    %p
31 32 33
      These settings require a
      = link_to 'restart', help_page_path('administration/restart_gitlab')
      to take effect.
34 35 36 37 38 39 40 41
    .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.
42 43 44 45 46 47 48 49 50
    .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
51
        = f.number_field :sidekiq_throttling_factor, class: 'form-control', min: '0.01', max: '0.99', step: '0.01'
52
        .help-block
53
          The factor by which the queues should be throttled. A value between 0.0 and 1.0, exclusive.
54

55 56 57 58 59 60 61 62
  %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
63
          %span.help-block#recaptcha_help_block Helps prevent bots from creating accounts
64 65 66 67 68 69

    .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
70
          Generate site and private keys at
71
          %a{ href: 'http://www.google.com/recaptcha', target: 'blank' } http://www.google.com/recaptcha
72

73 74 75 76 77
    .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'

78 79 80 81 82 83 84 85 86 87 88 89 90 91
    .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
92
          %a{ href: 'http://www.akismet.com', target: 'blank' } http://www.akismet.com
93

94 95 96 97 98 99
    .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
100 101
          %span.help-block#unique_ip_help_block
            Helps prevent malicious users hide their activity
102 103 104 105 106 107 108 109 110 111 112 113 114

    .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
115
          How many seconds an IP will be counted towards the limit
116

117 118 119 120 121 122 123 124 125
  %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
126 127 128 129 130 131 132 133
  %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
134
          .help-block
135
            %p This setting requires a restart to take effect.
136
            Sentry is an error reporting and logging tool which is currently not shipped with GitLab, get it here:
137
            %a{ href: 'https://getsentry.com', target: '_blank', rel: 'noopener noreferrer' } https://getsentry.com
Jeroen Nijhof's avatar
Jeroen Nijhof committed
138 139 140 141 142 143

    .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'

144 145 146 147 148 149 150 151 152 153 154
    .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
155
      = f.label :clientside_sentry_dsn, 'Clientside Sentry DSN', class: 'control-label col-sm-2'
156
      .col-sm-10
157
        = f.text_field :clientside_sentry_dsn, class: 'form-control'
158

159 160
  %fieldset
    %legend Repository Storage
161 162 163 164 165 166 167
    .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
168
            Enable immutable, hash-based paths and repository names to store repositories on disk. This prevents
169 170
            repositories from having to be moved or renamed when the Project URL changes and may improve disk I/O performance.
            %em (EXPERIMENTAL)
171
    .form-group
172
      = f.label :repository_storages, 'Storage paths for new projects', class: 'control-label col-sm-2'
173
      .col-sm-10
174 175
        = f.select :repository_storages, repository_storages_options_for_select(@application_setting.repository_storages),
          {include_hidden: false}, multiple: true, class: 'form-control'
176
        .help-block
177 178 179
          Manage repository storage paths. Learn more in the
          = succeed "." do
            = link_to "repository storages documentation", help_page_path("administration/repository_storages")
180

181 182
  %fieldset
    %legend Git Storage Circuitbreaker settings
183 184 185 186 187 188
    .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
189
    .form-group
190
      = f.label :circuitbreaker_access_retries, _('Number of access attempts'), class: 'control-label col-sm-2'
191
      .col-sm-10
192
        = f.number_field :circuitbreaker_access_retries, class: 'form-control'
193
        .help-block
194 195 196 197 198 199 200
          = 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
201
    .form-group
202
      = f.label :circuitbreaker_failure_count_threshold, _('Maximum git storage failures'), class: 'control-label col-sm-2'
203
      .col-sm-10
204
        = f.number_field :circuitbreaker_failure_count_threshold, class: 'form-control'
205
        .help-block
206
          = circuitbreaker_failure_count_help_text
207
    .form-group
208
      = f.label :circuitbreaker_failure_reset_time, _('Seconds before reseting failure information'), class: 'control-label col-sm-2'
209
      .col-sm-10
210
        = f.number_field :circuitbreaker_failure_reset_time, class: 'form-control'
211
        .help-block
212
          = circuitbreaker_failure_reset_time_help_text
213

214 215 216 217 218 219 220 221 222
  %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
223
            GitLab will periodically run
224 225
            %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.
226 227 228 229
    .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
230
          If you got a lot of false alarms from repository checks you can choose to clear all repository check information from the database.
231

232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
  - 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")
253

254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
  %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.

271
  %fieldset
272
    %legend#usage-statistics Usage statistics
273 274 275 276 277
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :version_check_enabled do
            = f.check_box :version_check_enabled
278
            Enable version check
279
          .help-block
280 281 282
            GitLab will inform you if a new version is available.
            = link_to 'Learn more', help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check")
            about what information is shared with GitLab Inc.
283 284
    .form-group
      .col-sm-offset-2.col-sm-10
285
        - can_be_configured = @application_setting.usage_ping_can_be_configured?
286 287
        .checkbox
          = f.label :usage_ping_enabled do
288
            = f.check_box :usage_ping_enabled, disabled: !can_be_configured
289
            Enable usage ping
290
          .help-block
291
            - if can_be_configured
292 293 294 295 296 297
              To help improve GitLab and its user experience, GitLab will
              periodically collect usage information.
              = link_to 'Learn more', help_page_path("user/admin_area/settings/usage_statistics", anchor: "usage-ping")
              about what information is shared with GitLab Inc. Visit
              = link_to 'Cohorts', admin_cohorts_path(anchor: 'usage-ping')
              to see the JSON payload sent.
298 299 300 301 302
            - 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')
303 304 305 306 307 308 309 310 311 312 313 314 315

  %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.
316 317 318 319 320 321 322 323 324 325
    .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.
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364
  %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.

365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388
  %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.

389 390 391 392 393 394 395 396
  %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).
397
          0 for unlimited.
398

399 400 401 402 403 404 405 406 407 408 409 410 411
  %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.
412
          = link_to icon('question-circle'), help_page_path('administration/polling')
413

414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429
  %fieldset
    %legend Performance optimization
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :authorized_keys_enabled do
            = f.check_box :authorized_keys_enabled
            Write to "authorized_keys" file
          .help-block
            By default, we write to the "authorized_keys" file to support Git
            over SSH without additional configuration. GitLab can be optimized
            to authenticate SSH keys via the database file. Only uncheck this
            if you have configured your OpenSSH server to use the
            AuthorizedKeysCommand. Click on the help icon for more details.
            = link_to icon('question-circle'), help_page_path('administration/operations/fast_ssh_key_lookup')

Michael Kozono's avatar
Michael Kozono committed
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
  %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'

481 482 483 484 485 486 487 488 489
  %fieldset
    %legend Outbound requests
    .form-group
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :allow_local_requests_from_hooks_and_services do
            = f.check_box :allow_local_requests_from_hooks_and_services
            Allow requests to the local network from hooks and services

490
  .form-actions
491
    = f.submit 'Save', class: 'btn btn-save'