File: _projects_api_limits.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (50 lines) | stat: -rw-r--r-- 3,423 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
= render ::Layouts::SettingsBlockComponent.new(_('Projects API rate limits'),
  id: 'js-projects-api-limits-settings',
  testid: 'projects-api-limits-settings',
  expanded: expanded_by_default?) do |c|
  - c.with_description do
    = _('Set the per-user and per-IP address rate limits for the requests to Projects API.')
    = link_to _('Learn more.'), help_page_path('administration/settings/rate_limit_on_projects_api.md'), target: '_blank', rel: 'noopener noreferrer'
  - c.with_body do
    = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-projects-api-limits-settings'), html: { class: 'fieldset-form' } do |f|
      = form_errors(@application_setting)

      %fieldset
        = _("Set to 0 to disable the limits.")

      %fieldset
        .form-group
          = f.label :projects_api_rate_limit_unauthenticated, format(_('Maximum requests to the %{api_name} API per %{timeframe} per IP address for unauthenticated requests'), api_name: 'GET /projects', timeframe: '10 minutes'), class: 'label-bold'
          = f.number_field :projects_api_rate_limit_unauthenticated,  min: 0, class: 'form-control gl-form-input'

      %fieldset
        .form-group
          = f.label :projects_api_limit, format(_('Maximum requests to the %{api_name} API per %{timeframe} per user for authenticated requests'), api_name: 'GET /projects', timeframe: '10 minutes'), class: 'label-bold'
          = f.number_field :projects_api_limit, min: 0, class: 'form-control gl-form-input'

      %fieldset
        .form-group
          = f.label :project_api_limit, format(_('Maximum requests to the %{api_name} API per %{timeframe} per user or IP address'), api_name: 'GET /projects/:id', timeframe: 'minute'), class: 'label-bold'
          = f.number_field :project_api_limit, min: 0, class: 'form-control gl-form-input'

      %fieldset
        .form-group
          = f.label :user_projects_api_limit, format(_('Maximum requests to the %{api_name} API per %{timeframe} per user or IP address'), api_name: 'GET /users/:user_id/projects', timeframe: 'minute'), class: 'label-bold'
          = f.number_field :user_projects_api_limit, min: 0, class: 'form-control gl-form-input'

      %fieldset
        .form-group
          = f.label :user_contributed_projects_api_limit, format(_('Maximum requests to the %{api_name} API per %{timeframe} per user or IP address'), api_name: 'GET /users/:user_id/contributed_projects', timeframe: 'minute'), class: 'label-bold'
          = f.number_field :user_contributed_projects_api_limit, min: 0, class: 'form-control gl-form-input'

      %fieldset
        .form-group
          = f.label :user_starred_projects_api_limit, format(_('Maximum requests to the %{api_name} API per %{timeframe} per user or IP address'), api_name: 'GET /users/:user_id/starred_projects', timeframe: 'minute'), class: 'label-bold'
          = f.number_field :user_starred_projects_api_limit, min: 0, class: 'form-control gl-form-input'

      %fieldset
        .form-group
          = f.label :project_invited_groups_api_limit, format(_('Maximum requests to the %{api_name} API per %{timeframe} per user or IP address'), api_name: 'GET /projects/:id/invited_groups', timeframe: 'minute'), class: 'label-bold'
          = f.number_field :project_invited_groups_api_limit, min: 0, class: 'form-control gl-form-input'

      = f.submit _('Save changes'), pajamas_button: true