Commit a780bfe2 authored by James Fargher's avatar James Fargher

Merge branch '195889-integrations-list-views-should-use-recommended-page-layout' into 'master'

Apply shared integrations view to project level

See merge request gitlab-org/gitlab!30971
parents 7725c5e7 0830fec4
......@@ -80,7 +80,7 @@ module ServicesHelper
def scoped_edit_integration_path(integration)
if @project.present?
edit_project_settings_integration_path(@project, integration)
edit_project_service_path(@project, integration)
elsif @group.present?
edit_group_settings_integration_path(@group, integration)
else
......
......@@ -18,7 +18,7 @@
%p
= s_('AdminSettings|Integrations configured here will automatically apply to all projects on this instance.')
= link_to _('Learn more'), '#'
= render 'shared/integrations/integrations', integrations: @integrations
= render 'shared/integrations/index', integrations: @integrations
- else
= render_if_exists 'admin/application_settings/elasticsearch_form'
......
......@@ -6,4 +6,4 @@
%p
= s_('GroupSettings|Integrations configured here will automatically apply to all projects in this group.')
= link_to _('Learn more'), '#'
= render 'shared/integrations/integrations', integrations: @integrations
= render 'shared/integrations/index', integrations: @integrations
.row.prepend-top-default
.col-lg-4
%h4.prepend-top-0
= _('Integrations')
%p= _('Integrations allow you to integrate GitLab with other applications')
.col-lg-8
%table.table
%colgroup
%col
%col
%col
%col{ width: "120" }
%thead
%tr
%th
%th= _('Integration')
%th.d-none.d-sm-block= _("Description")
%th= s_("ProjectService|Last edit")
- @services.sort_by(&:title).each do |service|
%tr
%td{ "aria-label" => (service.activated? ? s_("ProjectService|%{service_title}: status on") : s_("ProjectService|%{service_title}: status off")) % { service_title: service.title } }
= boolean_to_icon service.activated?
%td
= link_to edit_project_service_path(@project, service.to_param), { data: { qa_selector: "#{service.title.downcase.gsub(/[\s\(\)]/,'_')}_link" } } do
%strong= service.title
%td.d-none.d-sm-block
= service.description
%td.light
- if service.updated_at.present?
= time_ago_with_tooltip service.updated_at
......@@ -12,4 +12,6 @@
.gl-alert-actions
= link_to _('Go to Webhooks'), project_hooks_path(@project), class: 'btn gl-alert-action btn-info new-gl-button'
= render 'projects/services/index'
%h4= s_('Integrations')
%p= s_('Integrations allow you to integrate GitLab with other applications')
= render 'shared/integrations/index', integrations: @services
......@@ -3,7 +3,7 @@
%col
%col
%col.d-none.d-sm-table-column
%col{ width: 120 }
%col{ width: 130 }
%thead{ role: 'rowgroup' }
%tr{ role: 'row' }
%th{ role: 'columnheader', scope: 'col', 'aria-colindex': 1 }
......@@ -13,13 +13,14 @@
%tbody{ role: 'rowgroup' }
- integrations.each do |integration|
- activated_label = (integration.activated? ? s_("ProjectService|%{service_title}: status on") : s_("ProjectService|%{service_title}: status off")) % { service_title: integration.title }
%tr{ role: 'row' }
%td{ role: 'cell', 'aria-colindex': 1 }
%td{ role: 'cell', 'aria-colindex': 1, 'aria-label': activated_label }
= boolean_to_icon integration.activated?
%td{ role: 'cell', 'aria-colindex': 2 }
= link_to scoped_edit_integration_path(integration) do
= link_to scoped_edit_integration_path(integration), { data: { qa_selector: "#{integration.to_param}_link" } } do
%strong= integration.title
%td.d-none.d-sm-block{ role: 'cell', 'aria-colindex': 3 }
%td.d-none.d-sm-table-cell{ role: 'cell', 'aria-colindex': 3 }
= integration.description
%td{ role: 'cell', 'aria-colindex': 4 }
- if integration.updated_at.present?
......
---
title: Apply shared integrations view to project level
merge_request: 30971
author:
type: changed
......@@ -16143,9 +16143,6 @@ msgstr ""
msgid "ProjectService|Comment will be posted on each event"
msgstr ""
msgid "ProjectService|Last edit"
msgstr ""
msgid "ProjectService|Perform common operations on GitLab project: %{project_name}"
msgstr ""
......
......@@ -6,12 +6,12 @@ module QA
module Project
module Settings
class Integrations < QA::Page::Base
view 'app/views/projects/services/_index.html.haml' do
element :jenkins_ci_link, '{ data: { qa_selector: "#{service.title.downcase.gsub' # rubocop:disable QA/ElementWithPattern
view 'app/views/shared/integrations/_index.html.haml' do
element :jenkins_link, '{ data: { qa_selector: "#{integration.to_param' # rubocop:disable QA/ElementWithPattern
end
def click_jenkins_ci_link
click_element :jenkins_ci_link
click_element :jenkins_link
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment