summaryrefslogtreecommitdiff
path: root/app/views/projects/hooks/edit.html.haml
blob: 3358025b2370562bef226124869f03bb046e4085 (plain)
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
- @content_class = 'limit-container-width' unless fluid_layout
- add_to_breadcrumbs _('Webhook Settings'), project_hooks_path(@project)
- page_title _('Webhook')

- if @hook.rate_limited?
  - placeholders = { strong_start: '<strong>'.html_safe,
    strong_end: '</strong>'.html_safe,
    limit: @hook.rate_limit,
    support_link_start: '<a href="https://support.gitlab.com/hc/en-us/requests/new">'.html_safe,
    support_link_end: '</a>'.html_safe }
  = render 'shared/global_alert',
    title: s_('Webhooks|Webhook was automatically disabled'),
    variant: :danger,
    is_contained: true,
    close_button_class: 'js-close' do
    .gl-alert-body
      = s_('Webhooks|The webhook was triggered more than %{limit} times per minute and is now disabled. To re-enable this webhook, fix the problems shown in %{strong_start}Recent events%{strong_end}, then re-test your settings. %{support_link_start}Contact Support%{support_link_end} if you need help re-enabling your webhook.').html_safe % placeholders

.row.gl-mt-3
  .col-lg-3
    = render 'shared/web_hooks/title_and_docs', hook: @hook

  .col-lg-9.gl-mb-3
    = form_for [@project, @hook], as: :hook, url: project_hook_path(@project, @hook) do |f|
      = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook }

      = f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mr-3'
      = render 'shared/web_hooks/test_button', hook: @hook
      = link_to _('Delete'), project_hook_path(@project, @hook), method: :delete, class: 'btn gl-button btn-danger float-right', data: { confirm: _('Are you sure?') }

%hr

= render partial: 'projects/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs, project: @project }