2019-11-04 01:06:46 -05:00
|
|
|
- expanded = integration_expanded?('snowplow_')
|
2021-11-25 10:09:54 -05:00
|
|
|
%section.settings.as-snowplow.no-animate#js-snowplow-settings{ class: ('expanded' if expanded), data: { qa_selector: 'snowplow_settings_content' } }
|
2019-08-14 15:21:58 -04:00
|
|
|
.settings-header
|
|
|
|
%h4
|
|
|
|
= _('Snowplow')
|
2022-06-13 14:09:22 -04:00
|
|
|
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
|
2019-08-14 15:21:58 -04:00
|
|
|
= expanded ? _('Collapse') : _('Expand')
|
|
|
|
%p
|
2021-06-23 02:07:08 -04:00
|
|
|
- link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('development/snowplow/index') }
|
2021-10-12 08:09:36 -04: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 15:21:58 -04:00
|
|
|
.settings-content
|
2022-04-08 20:09:46 -04: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 01:06:46 -05:00
|
|
|
= form_errors(@application_setting) if expanded
|
2019-08-14 15:21:58 -04:00
|
|
|
|
|
|
|
%fieldset
|
|
|
|
.form-group
|
2022-04-08 20:09:46 -04:00
|
|
|
= f.gitlab_ui_checkbox_component :snowplow_enabled, _('Enable Snowplow tracking'), checkbox_options: { data: { qa_selector: 'snowplow_enabled_checkbox' } }
|
2019-08-14 15:21:58 -04:00
|
|
|
.form-group
|
|
|
|
= f.label :snowplow_collector_hostname, _('Collector hostname'), class: 'label-light'
|
2021-01-31 13:09:51 -05:00
|
|
|
= f.text_field :snowplow_collector_hostname, class: 'form-control gl-form-input', placeholder: 'snowplow.example.com'
|
2021-06-23 02:07:08 -04:00
|
|
|
.form-text.text-muted
|
|
|
|
= _('The hostname of your Snowplow collector.')
|
2019-08-14 15:21:58 -04:00
|
|
|
.form-group
|
2019-11-08 16:06:38 -05:00
|
|
|
= f.label :snowplow_app_id, _('App ID'), class: 'label-light'
|
2021-06-23 02:07:08 -04: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 15:21:58 -04:00
|
|
|
.form-group
|
|
|
|
= f.label :snowplow_cookie_domain, _('Cookie domain'), class: 'label-light'
|
2021-06-23 02:07:08 -04: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 15:21:58 -04:00
|
|
|
|
2021-11-25 10:09:54 -05:00
|
|
|
= f.submit _('Save changes'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'save_changes_button' }
|