2021-06-29 12:08:48 +00:00
- payload_class = 'js-service-ping-payload'
2020-08-27 15:10:21 +00:00
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
2021-04-26 12:09:44 +00:00
= _("Enable version check")
2018-06-13 07:40:55 +00:00
.form-text.text-muted
2021-10-04 15:12:14 +00:00
= _("GitLab informs you if a new version is available.")
= _("%{link_start}What information does GitLab Inc. collect?%{link_end}").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 }
2018-06-13 07:40:55 +00:00
.form-group
- can_be_configured = @application_setting.usage_ping_can_be_configured?
.form-check
2021-11-16 03:13:10 +00:00
= f.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input', data: { qa_selector: 'enable_usage_data_checkbox' }
2018-06-13 07:40:55 +00:00
= f.label :usage_ping_enabled, class: 'form-check-label' do
2021-10-04 15:12:14 +00:00
= _('Enable Service Ping')
2018-06-13 07:40:55 +00:00
.form-text.text-muted
- if can_be_configured
2021-10-04 15:12:14 +00:00
%p.mb-2= _('To help improve GitLab and its user experience, GitLab periodically collects usage information.')
2018-09-06 12:43:14 +00:00
2021-10-04 15:12:14 +00:00
- service_ping_path = help_page_path('development/service_ping/index.md')
2021-06-29 12:08:48 +00:00
- service_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: service_ping_path }
2021-10-04 15:12:14 +00:00
%p.mb-2= s_('%{service_ping_link_start}What information is shared with GitLab Inc.?%{service_ping_link_end}').html_safe % { service_ping_link_start: service_ping_link_start, service_ping_link_end: '</a>'.html_safe }
2018-09-06 12:43:14 +00:00
2021-04-10 03:09:09 +00:00
%button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } }
2022-03-17 21:08:35 +00:00
= gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2')
2022-01-24 15:11:33 +00:00
.js-text.gl-display-inline= _('Preview payload')
%pre.service-data-payload-container.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } }
2018-06-13 07:40:55 +00:00
- else
2021-07-14 12:09:23 +00:00
= _('Service ping is disabled in your configuration file, and cannot be enabled through this form.')
- deactivating_service_ping_path = help_page_path('development/service_ping/index.md', anchor: 'disable-service-ping-using-the-configuration-file')
2021-06-29 12:08:48 +00:00
- deactivating_service_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: deactivating_service_ping_path }
= s_('For more information, see the documentation on %{deactivating_service_ping_link_start}deactivating service ping%{deactivating_service_ping_link_end}.').html_safe % { deactivating_service_ping_link_start: deactivating_service_ping_link_start, deactivating_service_ping_link_end: '</a>'.html_safe }
2021-06-30 09:08:07 +00:00
.form-group
- usage_ping_enabled = @application_setting.usage_ping_enabled?
.form-check
= f.check_box :usage_ping_features_enabled?, disabled: !usage_ping_enabled, class: 'form-check-input'
2021-07-19 12:10:08 +00:00
= f.label :usage_ping_features_enabled?, class: 'form-check-label gl-cursor-not-allowed', id: 'service_ping_features_label' do
2021-06-30 09:08:07 +00:00
= _('Enable Registration Features')
2021-07-12 09:09:40 +00:00
= link_to sprite_icon('question-o'), help_page_path('development/service_ping/index.md', anchor: 'registration-features-program')
2021-06-30 09:08:07 +00:00
.form-text.text-muted
- if usage_ping_enabled
2021-07-19 12:10:08 +00:00
%p.gl-mb-3.text-muted{ id: 'service_ping_features_helper_text' }= _('You can enable Registration Features because Service Ping is enabled. To continue using Registration Features in the future, you will also need to register with GitLab via a new cloud licensing service.')
2021-06-30 09:08:07 +00:00
- else
2021-10-04 15:12:14 +00:00
%p.gl-mb-3.text-muted{ id: 'service_ping_features_helper_text' }= _('To enable Registration Features, first enable Service Ping.')
2021-06-30 09:08:07 +00:00
%p.gl-mb-3.text-muted= _('Registration Features include:')
.form-text
- email_from_gitlab_path = help_page_path('tools/email.md')
2021-09-29 18:12:42 +00:00
- repo_size_limit_path = help_page_path('user/admin_area/settings/account_and_limit_settings.md', anchor: 'repository-size-limit')
- restrict_ip_path = help_page_path('user/group/index.md', anchor: 'restrict-group-access-by-ip-address')
2021-06-30 09:08:07 +00:00
- link_end = '</a>'.html_safe
- email_from_gitlab_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: email_from_gitlab_path }
2021-09-29 18:12:42 +00:00
- repo_size_limit_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: repo_size_limit_path }
- restrict_ip_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: restrict_ip_path }
2021-06-30 09:08:07 +00:00
%ul
%li
= _('Email from GitLab - email users right from the Admin Area. %{link_start}Learn more%{link_end}.').html_safe % { link_start: email_from_gitlab_link, link_end: link_end }
2021-09-29 18:12:42 +00:00
%li
2021-10-04 15:12:14 +00:00
= _('Limit project size at a global, group, and project level. %{link_start}Learn more%{link_end}.').html_safe % { link_start: repo_size_limit_link, link_end: link_end }
2021-09-29 18:12:42 +00:00
%li
= _('Restrict group access by IP address. %{link_start}Learn more%{link_end}.').html_safe % { link_start: restrict_ip_link, link_end: link_end }
2018-04-04 09:44:32 +00:00
2021-04-26 12:09:44 +00:00
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"