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