debian-mirror-gitlab/app/views/admin/application_settings/_usage.html.haml

41 lines
2.8 KiB
Text
Raw Normal View History

2020-11-24 15:15:51 +05:30
- payload_class = 'js-usage-ping-payload'
2019-09-30 21:07:59 +05:30
= form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), html: { class: 'fieldset-form' } do |f|
2018-05-09 12:01:36 +05:30
= form_errors(@application_setting)
%fieldset
2018-11-20 20:47:30 +05:30
.form-group.mb-2
2018-11-08 19:23:39 +05:30
.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.
2020-11-24 15:15:51 +05:30
= link_to 'Learn more', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check')
2018-11-08 19:23:39 +05:30
about what information is shared with GitLab Inc.
2018-05-09 12:01:36 +05:30
.form-group
2018-11-08 19:23:39 +05:30
- 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
2018-11-20 20:47:30 +05:30
= _('Enable usage ping')
2018-11-08 19:23:39 +05:30
.form-text.text-muted
- if can_be_configured
2018-11-20 20:47:30 +05:30
%p.mb-2= _('To help improve GitLab and its user experience, GitLab will periodically collect usage information.')
2020-11-24 15:15:51 +05:30
- usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping')
2018-11-20 20:47:30 +05:30
- 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 }
2020-11-24 15:15:51 +05:30
%button.btn.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } }
2020-03-13 15:44:24 +05:30
.spinner.js-spinner.d-none
2018-11-20 20:47:30 +05:30
.js-text.d-inline= _('Preview payload')
2020-11-24 15:15:51 +05:30
%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) } }
2018-11-08 19:23:39 +05:30
- else
2018-11-20 20:47:30 +05:30
= _('The usage ping is disabled, and cannot be configured through this form.')
2021-01-03 14:25:43 +05:30
- deactivating_usage_ping_path = help_page_path('development/product_analytics/usage_ping', anchor: 'disable-usage-ping')
2018-11-20 20:47:30 +05:30
- 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 }
2018-05-09 12:01:36 +05:30
2021-01-03 14:25:43 +05:30
= f.submit 'Save changes', class: "gl-button btn btn-success"