Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_usage.html.haml « application_settings « admin « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 64e8751bf311712e8c177b60020d8b313babbb5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- payload_class = 'js-usage-ping-payload'

= form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), html: { class: 'fieldset-form' } do |f|
  = form_errors(@application_setting)

  %fieldset
    .form-group.mb-2
      .form-check
        = f.check_box :version_check_enabled, class: 'form-check-input'
        = f.label :version_check_enabled, class: 'form-check-label' do
          = _("Enable version check")
        .form-text.text-muted
          = _("GitLab will inform you if a new version is available.")
          = _("%{link_start}Learn more%{link_end} about what information is shared with GitLab Inc.").html_safe % { link_start: "<a href='#{help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check")}'>".html_safe, link_end: '</a>'.html_safe }
    .form-group
      - can_be_configured = @application_setting.usage_ping_can_be_configured?
      .form-check
        = f.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input'
        = f.label :usage_ping_enabled, class: 'form-check-label' do
          = _('Enable usage ping')
        .form-text.text-muted
          - if can_be_configured
            %p.mb-2= _('To help improve GitLab and its user experience, GitLab will periodically collect usage information.')

            - usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping')
            - usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: usage_ping_path }
            %p.mb-2= s_('%{usage_ping_link_start}Learn more%{usage_ping_link_end} about what information is shared with GitLab Inc.').html_safe % { usage_ping_link_start: usage_ping_link_start, usage_ping_link_end: '</a>'.html_safe }

            %button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } }
              .gl-spinner.js-spinner.gl-display-none.gl-mr-2
              .js-text.d-inline= _('Preview payload')
            %pre.usage-data.js-syntax-highlight.code.highlight.mt-2.d-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } }
          - else
            = _('The usage ping is disabled, and cannot be configured through this form.')
            - deactivating_usage_ping_path = help_page_path('development/usage_ping/index.md', anchor: 'disable-usage-ping')
            - deactivating_usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: deactivating_usage_ping_path }
            = s_('For more information, see the documentation on %{deactivating_usage_ping_link_start}deactivating the usage ping%{deactivating_usage_ping_link_end}.').html_safe % { deactivating_usage_ping_link_start: deactivating_usage_ping_link_start, deactivating_usage_ping_link_end: '</a>'.html_safe }

  = f.submit _('Save changes'), class: "gl-button btn btn-confirm"