diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-25 00:06:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-25 00:06:26 +0300 |
commit | 46bfa73d93786bc2a832be7e42e2119712a0bafb (patch) | |
tree | da48cc5babc92871cda768a980042aeb061c5ace /app/views | |
parent | c4edbefa458319a81e238f8f034d19f6ea6292ca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/application_settings/_pendo.html.haml | 24 | ||||
-rw-r--r-- | app/views/admin/application_settings/integrations.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/_head.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/_pendo.html.haml | 17 | ||||
-rw-r--r-- | app/views/layouts/_snowplow.html.haml | 2 |
5 files changed, 3 insertions, 44 deletions
diff --git a/app/views/admin/application_settings/_pendo.html.haml b/app/views/admin/application_settings/_pendo.html.haml deleted file mode 100644 index c165610b332..00000000000 --- a/app/views/admin/application_settings/_pendo.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -- expanded = true if !@application_setting.valid? && @application_setting.errors.any? { |k| k.to_s.start_with?('pendo_') } -%section.settings.as-pendo.no-animate#js-pendo-settings{ class: ('expanded' if expanded) } - .settings-header - %h4 - = _('Pendo') - %button.btn.btn-default.js-settings-toggle{ type: 'button' } - = expanded ? _('Collapse') : _('Expand') - %p - = _('Configure the %{link} integration.').html_safe % { link: link_to('Pendo', 'https://www.pendo.io/', target: '_blank') } - .settings-content - - = form_for @application_setting, url: integrations_admin_application_settings_path(anchor: 'js-pendo-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) if expanded - - %fieldset - .form-group - .form-check - = f.check_box :pendo_enabled, class: 'form-check-input' - = f.label :pendo_enabled, _('Enable pendo tracking'), class: 'form-check-label' - .form-group - = f.label :pendo_url, _('Pendo endpoint'), class: 'label-light' - = f.text_field :pendo_url, class: 'form-control', placeholder: 'https://cdn.pendo.io/agent/static/your-api-key/pendo.js' - - = f.submit _('Save changes'), class: 'btn btn-success' diff --git a/app/views/admin/application_settings/integrations.html.haml b/app/views/admin/application_settings/integrations.html.haml index 399f3566cef..e1079e5650f 100644 --- a/app/views/admin/application_settings/integrations.html.haml +++ b/app/views/admin/application_settings/integrations.html.haml @@ -29,4 +29,4 @@ = render 'third_party_offers', application_setting: @application_setting = render 'admin/application_settings/snowplow', expanded: expanded_by_default? -= render 'admin/application_settings/pendo' += render_if_exists 'admin/application_settings/pendo' diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index d7319b18092..6aebe42b74d 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -90,4 +90,4 @@ = render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id') = render 'layouts/piwik' if extra_config.has_key?('piwik_url') && extra_config.has_key?('piwik_site_id') = render 'layouts/snowplow' - = render 'layouts/pendo' + = render_if_exists 'layouts/pendo' diff --git a/app/views/layouts/_pendo.html.haml b/app/views/layouts/_pendo.html.haml deleted file mode 100644 index 08b1acbe3d3..00000000000 --- a/app/views/layouts/_pendo.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -- return unless Gitlab::CurrentSettings.pendo_enabled? - -= javascript_tag nonce: true do - :plain - ;var trackable = !['1', 'yes'].includes(window.doNotTrack || navigator.doNotTrack || navigator.msDoNotTrack); - if (trackable){ - (function(p,e,n,d,o){var v,w,x,y,z;o=p[d]=p[d]||{};o._q=[]; - v=['initialize','identify','updateOptions','pageLoad'];for(w=0,x=v.length;w<x;++w)(function(m){ - o[m]=o[m]||function(){o._q[m===v[0]?'unshift':'push']([m].concat([].slice.call(arguments,0)));};})(v[w]); - y=e.createElement(n);y.async=!0;y.src='#{Gitlab::CurrentSettings.pendo_url}'; - z=e.getElementsByTagName(n)[0];z.parentNode.insertBefore(y,z);})(window,document,'script','pendo'); - - pendo.initialize({ - visitor: { - id: '#{current_user&.id}', - } - });}; diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml index 3c06bca0f95..d7ff5ad1094 100644 --- a/app/views/layouts/_snowplow.html.haml +++ b/app/views/layouts/_snowplow.html.haml @@ -7,4 +7,4 @@ };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","#{asset_url('snowplow/sp.js')}","snowplow")); - window.snowplowOptions = #{Gitlab::Tracking.snowplow_options(@group, current_user).to_json} + window.snowplowOptions = #{Gitlab::Tracking.snowplow_options(@group).to_json} |