Skip to content
Snippets Groups Projects
Commit 13867d66 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 83758a4e
No related branches found
No related tags found
No related merge requests found
Showing
with 140 additions and 103 deletions
Loading
Loading
@@ -411,6 +411,7 @@ linters:
- 'app/views/shared/snippets/_snippet.html.haml'
- 'app/views/shared/tokens/_scopes_list.html.haml'
- 'app/views/shared/web_hooks/_form.html.haml'
- 'app/views/shared/web_hooks/_hook.html.haml'
- 'app/views/shared/web_hooks/_test_button.html.haml'
- 'app/views/u2f/_authenticate.html.haml'
- 'app/views/u2f/_register.html.haml'
Loading
Loading
@@ -442,7 +443,7 @@ linters:
- 'ee/app/views/groups/epics/_epic.html.haml'
- 'ee/app/views/groups/group_members/_ldap_sync.html.haml'
- 'ee/app/views/groups/group_members/_sync_button.html.haml'
- 'ee/app/views/groups/hooks/_project_hook.html.haml'
- 'ee/app/views/groups/hooks/edit.html.haml'
- 'ee/app/views/groups/hooks/index.html.haml'
- 'ee/app/views/groups/ldap_group_links/index.html.haml'
- 'ee/app/views/groups/pipeline_quota/index.html.haml'
Loading
Loading
Loading
Loading
@@ -54,7 +54,7 @@ gem 'gssapi', group: :kerberos
 
# Spam and anti-bot protection
gem 'recaptcha', '~> 4.11', require: 'recaptcha/rails'
gem 'akismet', '~> 2.0'
gem 'akismet', '~> 3.0'
gem 'invisible_captcha', '~> 0.12.1'
 
# Two-factor authentication
Loading
Loading
Loading
Loading
@@ -58,7 +58,7 @@ GEM
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
aes_key_wrap (1.0.1)
akismet (2.0.0)
akismet (3.0.0)
apollo_upload_server (2.0.0.beta.3)
graphql (>= 1.8)
rails (>= 4.2)
Loading
Loading
@@ -1120,7 +1120,7 @@ DEPENDENCIES
activerecord-explain-analyze (~> 0.1)
acts-as-taggable-on (~> 6.0)
addressable (~> 2.5.2)
akismet (~> 2.0)
akismet (~> 3.0)
apollo_upload_server (~> 2.0.0.beta3)
asana (~> 0.9)
asciidoctor (~> 2.0.10)
Loading
Loading
Loading
Loading
@@ -35,11 +35,13 @@ export default {
 
<template>
<article class="file-holder limited-width-container readme-holder">
<div class="file-title">
<i aria-hidden="true" class="fa fa-file-text-o fa-fw"></i>
<gl-link :href="blob.webUrl">
<strong>{{ blob.name }}</strong>
</gl-link>
<div class="js-file-title file-title-flex-parent">
<div class="file-header-content">
<i aria-hidden="true" class="fa fa-file-text-o fa-fw"></i>
<gl-link :href="blob.webUrl">
<strong>{{ blob.name }}</strong>
</gl-link>
</div>
</div>
<div class="blob-viewer">
<gl-loading-icon v-if="loading > 0" size="md" class="my-4 mx-auto" />
Loading
Loading
Loading
Loading
@@ -645,6 +645,12 @@ h4 {
}
}
 
.text-right-md {
@include media-breakpoint-up(md) {
text-align: right;
}
}
.text-right-lg {
@include media-breakpoint-up(lg) {
text-align: right;
Loading
Loading
Loading
Loading
@@ -2,18 +2,40 @@
 
module HooksHelper
def link_to_test_hook(hook, trigger)
path = case hook
when ProjectHook
project = hook.project
test_project_hook_path(project, hook, trigger: trigger)
when SystemHook
test_admin_hook_path(hook, trigger: trigger)
end
path = test_hook_path(hook, trigger)
trigger_human_name = trigger.to_s.tr('_', ' ').camelize
 
link_to path, rel: 'nofollow', method: :post do
content_tag(:span, trigger_human_name)
end
end
def test_hook_path(hook, trigger)
case hook
when ProjectHook
test_project_hook_path(hook.project, hook, trigger: trigger)
when SystemHook
test_admin_hook_path(hook, trigger: trigger)
end
end
def edit_hook_path(hook)
case hook
when ProjectHook
edit_project_hook_path(hook.project, hook)
when SystemHook
edit_admin_hook_path(hook)
end
end
def destroy_hook_path(hook)
case hook
when ProjectHook
project_hook_path(hook.project, hook)
when SystemHook
admin_hook_path(hook)
end
end
end
HooksHelper.prepend_if_ee('EE::HooksHelper')
Loading
Loading
@@ -18,6 +18,10 @@ class ProjectHook < WebHook
 
belongs_to :project
validates :project, presence: true
def pluralized_name
_('Project Hooks')
end
end
 
ProjectHook.prepend_if_ee('EE::ProjectHook')
Loading
Loading
@@ -20,4 +20,12 @@ class SystemHook < WebHook
def allow_local_requests?
Gitlab::CurrentSettings.allow_local_requests_from_system_hooks?
end
def pluralized_name
_('System Hooks')
end
def help_path
'system_hooks/system_hooks'
end
end
Loading
Loading
@@ -37,4 +37,8 @@ class WebHook < ApplicationRecord
def allow_local_requests?
Gitlab::CurrentSettings.allow_local_requests_from_web_hooks_and_services?
end
def help_path
'user/project/integrations/webhooks'
end
end
- add_to_breadcrumbs "System Hooks", admin_hooks_path
- page_title 'Edit System Hook'
%h3.page-title
Edit System Hook
- add_to_breadcrumbs @hook.pluralized_name, admin_hooks_path
- page_title _('Edit System Hook')
 
%p.light
#{link_to 'System hooks ', help_page_path('system_hooks/system_hooks')} can be
used for binding events when GitLab creates a User or Project.
.row.prepend-top-default
.col-lg-3
= render 'shared/web_hooks/title_and_docs', hook: @hook
 
%hr
.col-lg-9.append-bottom-default
= form_for @hook, as: :hook, url: admin_hook_path do |f|
= render partial: 'form', locals: { form: f, hook: @hook }
.form-actions
%span>= f.submit _('Save changes'), class: 'btn btn-success append-right-8'
= render 'shared/web_hooks/test_button', hook: @hook
= link_to _('Delete'), admin_hook_path(@hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: _('Are you sure?') }
 
= form_for @hook, as: :hook, url: admin_hook_path do |f|
= render partial: 'form', locals: { form: f, hook: @hook }
.form-actions
= f.submit 'Save changes', class: 'btn btn-success'
= render 'shared/web_hooks/test_button', triggers: SystemHook.triggers, hook: @hook
= link_to 'Remove', admin_hook_path(@hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: 'Are you sure?' }
%hr
 
%hr
= render partial: 'admin/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs }
= render partial: 'admin/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs }
- page_title 'System Hooks'
- page_title @hook.pluralized_name
.row.prepend-top-default
.col-lg-4
%h4.prepend-top-0
= page_title
%p
#{link_to 'System hooks ', help_page_path('system_hooks/system_hooks')} can be
used for binding events when GitLab creates a User or Project.
= render 'shared/web_hooks/title_and_docs', hook: @hook
 
.col-lg-8.append-bottom-default
= form_for @hook, as: :hook, url: admin_hooks_path do |f|
= render partial: 'form', locals: { form: f, hook: @hook }
= f.submit 'Add system hook', class: 'btn btn-success'
%hr
= f.submit _('Add system hook'), class: 'btn btn-success'
 
- if @hooks.any?
.card
.card-header
System hooks (#{@hooks.count})
%ul.content-list
- @hooks.each do |hook|
%li
.controls
= render 'shared/web_hooks/test_button', triggers: SystemHook.triggers, hook: hook, button_class: 'btn-sm'
= link_to 'Edit', edit_admin_hook_path(hook), class: 'btn btn-sm'
= link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm'
.monospace= hook.url
%div
- SystemHook.triggers.each_value do |event|
- if hook.public_send(event)
%span.badge.badge-gray= event.to_s.titleize
%span.badge.badge-gray SSL Verification: #{hook.enable_ssl_verification ? 'enabled' : 'disabled'}
= render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class
 
= render 'shared/plugins/index'
.row.prepend-top-default
.col-lg-4
%h4.prepend-top-0
= page_title
%p
#{link_to 'Webhooks', help_page_path('user/project/integrations/webhooks')} can be
used for binding events when something is happening within the project.
= render 'shared/web_hooks/title_and_docs', hook: @hook
 
.col-lg-8.append-bottom-default
= form_for @hook, as: :hook, url: polymorphic_path([@project.namespace.becomes(Namespace), @project, :hooks]) do |f|
= render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook }
= f.submit 'Add webhook', class: 'btn btn-success'
 
%hr
%h5.prepend-top-default
Webhooks (#{@hooks.count})
- if @hooks.any?
%ul.content-list
- @hooks.each do |hook|
= render 'project_hook', hook: hook
- else
%p.settings-message.text-center.append-bottom-0
No webhooks found, add one in the form above.
= render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class
- page_title 'Integrations'
- add_to_breadcrumbs _('ProjectService|Integrations'), namespace_project_settings_integrations_path
- page_title _('Edit Project Hook')
 
.row.prepend-top-default
.col-lg-3
%h4.prepend-top-0
= page_title
%p
#{link_to 'Webhooks', help_page_path('user/project/integrations/webhooks')} can be
used for binding events when something is happening within the project.
= render 'shared/web_hooks/title_and_docs', hook: @hook
.col-lg-9.append-bottom-default
= form_for [@project.namespace.becomes(Namespace), @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 btn-success'
= render 'shared/web_hooks/test_button', triggers: ProjectHook.triggers, hook: @hook
= link_to 'Remove', project_hook_path(@project, @hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: 'Are you sure?' }
%span>= f.submit 'Save changes', class: 'btn btn-success append-right-8'
= render 'shared/web_hooks/test_button', hook: @hook
= link_to _('Delete'), project_hook_path(@project, @hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: _('Are you sure?') }
 
%hr
 
Loading
Loading
%li
.row
.col-md-8.col-lg-7
%strong.light-header= hook.url
%div
- ProjectHook.triggers.each_value do |event|
- if hook.public_send(event)
%span.badge.badge-gray.deploy-project-label= event.to_s.titleize
.col-md-4.col-lg-5.text-right-lg.prepend-top-5
%span.append-right-10.inline
#{_("SSL Verification")}: #{hook.enable_ssl_verification ? _('enabled') : _('disabled')}
= link_to _('Edit'), edit_project_hook_path(@project, hook), class: 'btn btn-sm'
= render 'shared/web_hooks/test_button', triggers: ProjectHook.triggers, hook: hook, button_class: 'btn-sm'
= link_to project_hook_path(@project, hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-transparent' do
%span.sr-only= _("Remove")
= icon('trash')
%li
.row
.col-md-8.col-lg-7
%strong.light-header= hook.url
%div
- hook.class.triggers.each_value do |trigger|
- if hook.public_send(trigger)
%span.badge.badge-gray.deploy-project-label= trigger.to_s.titleize
%span.badge.badge-gray
= _('SSL Verification:')
= hook.enable_ssl_verification ? _('enabled') : _('disabled')
.col-md-4.col-lg-5.text-right-md.prepend-top-5
%span>= render 'shared/web_hooks/test_button', hook: hook, button_class: 'btn-sm append-right-8'
%span>= link_to _('Edit'), edit_hook_path(hook), class: 'btn btn-sm append-right-8'
= link_to _('Delete'), destroy_hook_path(hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-sm'
%hr
.card
.card-header
%h5
= hook_class.underscore.humanize.titleize.pluralize
(#{hooks.count})
- if hooks.any?
%ul.content-list
- hooks.each do |hook|
= render 'shared/web_hooks/hook', hook: hook
- else
%p.text-center.prepend-top-default.append-bottom-default
= _('No webhooks found, add one in the form above.')
- triggers = local_assigns.fetch(:triggers)
- button_class = local_assigns.fetch(:button_class, '')
- hook = local_assigns.fetch(:hook)
- triggers = hook.class.triggers
 
.hook-test-button.dropdown.inline
.hook-test-button.dropdown.inline>
%button.btn{ 'data-toggle' => 'dropdown', class: button_class }
Test
= _('Test')
= icon('caret-down')
%ul.dropdown-menu.dropdown-menu-right{ role: 'menu' }
- triggers.each_value do |event|
Loading
Loading
%h4.prepend-top-0
= page_title
%p
- link = link_to(hook.pluralized_name, help_page_path(hook.help_path))
= _('%{link} can be used for binding events when something is happening within the project.').html_safe % { link: link }
---
title: Add _links object to package api response
merge_request: 20820
author:
type: added
---
title: Fix top border of README in vue_file_list
merge_request: 21578
author: Hector Bustillos
type: fixed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment