diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-30 09:08:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-30 09:08:52 +0300 |
commit | 52c7972910b960f37ae9792cb4d17876244d4bcf (patch) | |
tree | 2d385c9a546102c2b0c745f2a02d85d4a530f465 /app/views/help/instance_configuration | |
parent | ad7214cbd7285f1422cf0d82f6b9cfb0f5995e23 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/help/instance_configuration')
-rw-r--r-- | app/views/help/instance_configuration/_rate_limit_row.html.haml | 7 | ||||
-rw-r--r-- | app/views/help/instance_configuration/_rate_limits.html.haml | 36 |
2 files changed, 43 insertions, 0 deletions
diff --git a/app/views/help/instance_configuration/_rate_limit_row.html.haml b/app/views/help/instance_configuration/_rate_limit_row.html.haml new file mode 100644 index 00000000000..85c165de7d4 --- /dev/null +++ b/app/views/help/instance_configuration/_rate_limit_row.html.haml @@ -0,0 +1,7 @@ +- public_visible = local_assigns.fetch(:public_visible, false) + +- if rate_limit && (public_visible || user_signed_in?) + %tr + %td= title + %td= instance_configuration_cell_html(rate_limit[:enabled] ? rate_limit[:requests_per_period] : nil) + %td= instance_configuration_cell_html(rate_limit[:enabled] ? rate_limit[:period_in_seconds] : nil) diff --git a/app/views/help/instance_configuration/_rate_limits.html.haml b/app/views/help/instance_configuration/_rate_limits.html.haml new file mode 100644 index 00000000000..d72bd845c5b --- /dev/null +++ b/app/views/help/instance_configuration/_rate_limits.html.haml @@ -0,0 +1,36 @@ +- rate_limits = @instance_configuration.settings[:rate_limits] +- content_for :table_content do + - if rate_limits + %li= link_to _('Rate Limits'), '#rate-limits' + +- content_for :settings_content do + - if rate_limits + %h2#rate-limits + = _('Rate Limits') + + %p + = _('There are several rate limits in place to protect the system.') + .table-responsive + %table + %thead + %tr + %th= _('Rate limit') + %th= _('Requests per period') + %th= _('Period in seconds') + %tbody + = render 'help/instance_configuration/rate_limit_row', title: _('Unauthenticated requests'), rate_limit: rate_limits[:unauthenticated], public_visible: true + = render 'help/instance_configuration/rate_limit_row', title: _('Authenticated API requests'), rate_limit: rate_limits[:authenticated_api] + = render 'help/instance_configuration/rate_limit_row', title: _('Authenticated web requests'), rate_limit: rate_limits[:authenticated_web] + = render 'help/instance_configuration/rate_limit_row', title: _('Protected Paths: requests'), rate_limit: rate_limits[:protected_paths] + = render 'help/instance_configuration/rate_limit_row', title: _('Package Registry: unauthenticated API requests'), rate_limit: rate_limits[:unauthenticated_packages_api], public_visible: true + = render 'help/instance_configuration/rate_limit_row', title: _('Package Registry: authenticated API requests'), rate_limit: rate_limits[:authenticated_packages_api] + = render 'help/instance_configuration/rate_limit_row', title: _('Issue creation requests'), rate_limit: rate_limits[:issue_creation] + = render 'help/instance_configuration/rate_limit_row', title: _('Note creation requests'), rate_limit: rate_limits[:note_creation] + = render 'help/instance_configuration/rate_limit_row', title: _('Project export requests'), rate_limit: rate_limits[:project_export] + = render 'help/instance_configuration/rate_limit_row', title: _('Project export download requests'), rate_limit: rate_limits[:project_export_download] + = render 'help/instance_configuration/rate_limit_row', title: _('Project import requests'), rate_limit: rate_limits[:project_import] + = render 'help/instance_configuration/rate_limit_row', title: _('Group export requests'), rate_limit: rate_limits[:group_export] + = render 'help/instance_configuration/rate_limit_row', title: _('Group export download requests'), rate_limit: rate_limits[:group_export_download] + = render 'help/instance_configuration/rate_limit_row', title: _('Group import requests'), rate_limit: rate_limits[:group_import] + = render 'help/instance_configuration/rate_limit_row', title: _('Raw blob requests'), rate_limit: rate_limits[:raw_blob] + %br |