summaryrefslogtreecommitdiff
path: root/app/views/admin
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/application_settings/_issue_limits.html.haml9
-rw-r--r--app/views/admin/application_settings/network.html.haml11
-rw-r--r--app/views/admin/deploy_keys/index.html.haml2
3 files changed, 21 insertions, 1 deletions
diff --git a/app/views/admin/application_settings/_issue_limits.html.haml b/app/views/admin/application_settings/_issue_limits.html.haml
new file mode 100644
index 00000000000..5906358fbb1
--- /dev/null
+++ b/app/views/admin/application_settings/_issue_limits.html.haml
@@ -0,0 +1,9 @@
+= form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-issue-limits-settings'), html: { class: 'fieldset-form' } do |f|
+ = form_errors(@application_setting)
+
+ %fieldset
+ .form-group
+ = f.label :issues_create_limit, 'Max requests per second per user', class: 'label-bold'
+ = f.number_field :issues_create_limit, class: 'form-control'
+
+ = f.submit 'Save changes', class: "btn btn-success", data: { qa_selector: 'save_changes_button' }
diff --git a/app/views/admin/application_settings/network.html.haml b/app/views/admin/application_settings/network.html.haml
index 8d88dedf832..db4611964b4 100644
--- a/app/views/admin/application_settings/network.html.haml
+++ b/app/views/admin/application_settings/network.html.haml
@@ -46,4 +46,15 @@
.settings-content
= render 'protected_paths'
+%section.settings.as-issue-limits.no-animate#js-issue-limits-settings{ class: ('expanded' if expanded_by_default?) }
+ .settings-header
+ %h4
+ = _('Issues Rate Limits')
+ %button.btn.btn-default.js-settings-toggle{ type: 'button' }
+ = expanded_by_default? ? _('Collapse') : _('Expand')
+ %p
+ = _('Configure limit for issues created per minute by web and API requests.')
+ .settings-content
+ = render 'issue_limits'
+
= render_if_exists 'admin/application_settings/ee_network_settings'
diff --git a/app/views/admin/deploy_keys/index.html.haml b/app/views/admin/deploy_keys/index.html.haml
index 9fffa97f969..4e9cfc13af0 100644
--- a/app/views/admin/deploy_keys/index.html.haml
+++ b/app/views/admin/deploy_keys/index.html.haml
@@ -1,7 +1,7 @@
- page_title _('Deploy Keys')
%h3.page-title.deploy-keys-title
- = _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.count }
+ = _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size }
.float-right
= link_to _('New deploy key'), new_admin_deploy_key_path, class: 'btn btn-success btn-sm btn-inverted'