2019-02-20 16:56:19 +00:00
= form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), html: { class: 'fieldset-form' } do |f|
2018-04-04 09:44:32 +00:00
= form_errors(@application_setting)
%fieldset
2018-09-06 12:43:14 +00:00
.form-group.mb-2
2018-06-13 07:40:55 +00:00
.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-01-20 09:08:32 +00:00
= link_to 'Learn more', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check-core-only')
2018-06-13 07:40:55 +00:00
about what information is shared with GitLab Inc.
.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
2018-09-06 12:43:14 +00:00
= _('Enable usage ping')
2018-06-13 07:40:55 +00:00
.form-text.text-muted
- if can_be_configured
2018-09-06 12:43:14 +00:00
%p.mb-2= _('To help improve GitLab and its user experience, GitLab will periodically collect usage information.')
2020-01-20 09:08:32 +00:00
- usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping-core-only')
2018-09-06 12:43:14 +00:00
- 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.btn.js-usage-ping-payload-trigger{ type: 'button' }
2020-02-14 09:08:43 +00:00
.spinner.js-spinner.d-none
2018-09-06 12:43:14 +00:00
.js-text.d-inline= _('Preview payload')
%pre.usage-data.js-usage-ping-payload.js-syntax-highlight.code.highlight.mt-2.d-none{ data: { endpoint: usage_data_admin_application_settings_path(format: :html) } }
2018-06-13 07:40:55 +00:00
- else
2018-09-06 12:43:14 +00:00
= _('The usage ping is disabled, and cannot be configured through this form.')
- deactivating_usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'deactivate-the-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 }
.form-group.mt-3
2018-07-30 11:28:26 +00:00
= f.label :instance_statistics_visibility_private, _('Instance Statistics visibility')
= f.select :instance_statistics_visibility_private, options_for_select({_('All users') => false, _('Only admins') => true}, Gitlab::CurrentSettings.instance_statistics_visibility_private?), {}, class: 'form-control'
2018-04-04 09:44:32 +00:00
= f.submit 'Save changes', class: "btn btn-success"