Commit abaf1ec4 authored by Justin Ho's avatar Justin Ho

Remove project-specific elements from integrations

Some integrations do not display properly on the
instance-level because the views are dependent on
some project-specifiic code.

This replaces some of the copy and code with more
generic terms to allow these services to be setup on
the instane level as well.
parent c095e714
......@@ -15,6 +15,10 @@ class AlertsService < Service
before_validation :ensure_token, if: :activated?
def url
if instance? || template?
return '<namespace / project>'
end
url_helpers.project_alerts_notify_url(project, format: :json)
end
......
- run_actions_text = s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: @project.full_name }
- pretty_name = defined?(@project) ? @project.full_name : _('<project name / alias>')
- run_actions_text = s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: pretty_name }
%p= s_("ProjectService|To set up this service:")
%ul.list-unstyled.indent-list
......@@ -20,7 +21,7 @@
.form-group
= label_tag :display_name, _('Display name'), class: 'col-12 col-form-label label-bold'
.col-12.input-group
= text_field_tag :display_name, "GitLab / #{@project.full_name}", class: 'form-control form-control-sm', readonly: 'readonly'
= text_field_tag :display_name, "GitLab / #{pretty_name}", class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append
= clipboard_button(target: '#display_name', class: 'input-group-text')
......@@ -38,8 +39,9 @@
%p
= s_('MattermostService|Suggestions:')
%code= 'gitlab'
%code= @project.path # Path contains no spaces, but dashes
%code= @project.full_path
- if @project
%code= @project.path # Path contains no spaces, but dashes
%code= @project.full_path
.form-group
= label_tag :request_url, s_('MattermostService|Request URL'), class: 'col-12 col-form-label label-bold'
......
- pretty_name = defined?(@project) ? @project.full_name : 'namespace / path'
- run_actions_text = "Perform common operations on GitLab project: #{pretty_name}"
- pretty_name = defined?(@project) ? @project.full_name : _('<project name / alias>')
- run_actions_text = s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: pretty_name }
.info-well
.well-segment
......@@ -31,8 +31,10 @@
%p
= _("Suggestions:")
%code= 'gitlab'
%code= @project.path # Path contains no spaces, but dashes
%code= @project.full_path
%code= 'project'
- if @project
%code= @project.path # Path contains no spaces, but dashes
%code= @project.full_path
.form-group
= label_tag :url, 'URL', class: 'col-12 col-form-label label-bold'
......
---
title: Fix broken links in some Instance-level integrations
merge_request: 27298
author:
type: fixed
......@@ -9,5 +9,5 @@
See the list of available commands in Slack after setting up this service
by entering
%kbd.inline /gitlab help
- unless @service.template?
- unless @service.template? || @service.instance?
= render "projects/services/#{@service.to_param}/slack_integration_form"
......@@ -784,6 +784,9 @@ msgstr ""
msgid "<no scopes selected>"
msgstr ""
msgid "<project name / alias>"
msgstr ""
msgid "<strong>%{group_name}</strong> group members"
msgstr ""
......
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