summaryrefslogtreecommitdiff
path: root/app/models/integrations/external_wiki.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/integrations/external_wiki.rb')
-rw-r--r--app/models/integrations/external_wiki.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/integrations/external_wiki.rb b/app/models/integrations/external_wiki.rb
index bc2ea193a84..75fe6b6f164 100644
--- a/app/models/integrations/external_wiki.rb
+++ b/app/models/integrations/external_wiki.rb
@@ -5,6 +5,7 @@ module Integrations
validates :external_wiki_url, presence: true, public_url: true, if: :activated?
field :external_wiki_url,
+ section: SECTION_TYPE_CONNECTION,
title: -> { s_('ExternalWikiService|External wiki URL') },
placeholder: -> { s_('ExternalWikiService|https://example.com/xxx/wiki/...') },
help: -> { s_('ExternalWikiService|Enter the URL to the external wiki.') },
@@ -28,6 +29,16 @@ module Integrations
s_('Link an external wiki from the project\'s sidebar. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
end
+ def sections
+ [
+ {
+ type: SECTION_TYPE_CONNECTION,
+ title: s_('Integrations|Connection details'),
+ description: help
+ }
+ ]
+ end
+
def execute(_data)
response = Gitlab::HTTP.get(properties['external_wiki_url'], verify: true)
response.body if response.code == 200