2019-11-04 06:06:46 +00:00
|
|
|
- expanded = integration_expanded?('snowplow_')
|
2021-11-25 15:09:54 +00:00
|
|
|
%section.settings.as-snowplow.no-animate#js-snowplow-settings{ class: ('expanded' if expanded), data: { qa_selector: 'snowplow_settings_content' } }
|
2019-08-14 19:21:58 +00:00
|
|
|
.settings-header
|
2022-07-06 18:08:29 +00:00
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
|
2019-08-14 19:21:58 +00:00
|
|
|
= _('Snowplow')
|
2022-06-13 18:09:22 +00:00
|
|
|
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
|
2019-08-14 19:21:58 +00:00
|
|
|
= expanded ? _('Collapse') : _('Expand')
|
|
|
|
%p
|
2021-06-23 06:07:08 +00:00
|
|
|
- link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('development/snowplow/index') }
|
2021-10-12 12:09:36 +00:00
|
|
|
= html_escape(_('Configure %{link} to track events. %{link_start}Learn more.%{link_end}')) % { link: link_to('Snowplow', 'https://snowplowanalytics.com/', target: '_blank', rel: 'noopener noreferrer').html_safe, link_start: link_start, link_end: '</a>'.html_safe }
|
2019-08-14 19:21:58 +00:00
|
|
|
.settings-content
|
2022-04-09 00:09:46 +00:00
|
|
|
= gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-snowplow-settings'), html: { class: 'fieldset-form', id: 'snowplow-settings' } do |f|
|
2019-11-04 06:06:46 +00:00
|
|
|
= form_errors(@application_setting) if expanded
|
2019-08-14 19:21:58 +00:00
|
|
|
|
|
|
|
%fieldset
|
|
|
|
.form-group
|
2022-04-09 00:09:46 +00:00
|
|
|
= f.gitlab_ui_checkbox_component :snowplow_enabled, _('Enable Snowplow tracking'), checkbox_options: { data: { qa_selector: 'snowplow_enabled_checkbox' } }
|
2019-08-14 19:21:58 +00:00
|
|
|
.form-group
|
|
|
|
= f.label :snowplow_collector_hostname, _('Collector hostname'), class: 'label-light'
|
2021-01-31 18:09:51 +00:00
|
|
|
= f.text_field :snowplow_collector_hostname, class: 'form-control gl-form-input', placeholder: 'snowplow.example.com'
|
2021-06-23 06:07:08 +00:00
|
|
|
.form-text.text-muted
|
|
|
|
= _('The hostname of your Snowplow collector.')
|
2019-08-14 19:21:58 +00:00
|
|
|
.form-group
|
2019-11-08 21:06:38 +00:00
|
|
|
= f.label :snowplow_app_id, _('App ID'), class: 'label-light'
|
2021-06-23 06:07:08 +00:00
|
|
|
= f.text_field :snowplow_app_id, class: 'form-control gl-form-input', placeholder: 'gitlab'
|
|
|
|
.form-text.text-muted
|
|
|
|
= _('The ID of the application.')
|
2019-08-14 19:21:58 +00:00
|
|
|
.form-group
|
|
|
|
= f.label :snowplow_cookie_domain, _('Cookie domain'), class: 'label-light'
|
2021-06-23 06:07:08 +00:00
|
|
|
= f.text_field :snowplow_cookie_domain, class: 'form-control gl-form-input', placeholder: '.your-gitlab-instance.com'
|
|
|
|
.form-text.text-muted
|
|
|
|
= _('The Snowplow cookie domain.')
|
2019-08-14 19:21:58 +00:00
|
|
|
|
2021-11-25 15:09:54 +00:00
|
|
|
= f.submit _('Save changes'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'save_changes_button' }
|