68 lines
5.5 KiB
Text
68 lines
5.5 KiB
Text
- payload_class = 'js-service-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 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 }
|
|
.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 Service Ping')
|
|
.form-text.text-muted
|
|
- if can_be_configured
|
|
%p.mb-2= _('To help improve GitLab and its user experience, GitLab periodically collects usage information.')
|
|
|
|
- service_ping_path = help_page_path('development/service_ping/index.md')
|
|
- service_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: service_ping_path }
|
|
%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 }
|
|
|
|
%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.service-data-payload-container.js-syntax-highlight.code.highlight.mt-2.d-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } }
|
|
- else
|
|
= _('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')
|
|
- 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 }
|
|
.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'
|
|
= f.label :usage_ping_features_enabled?, class: 'form-check-label gl-cursor-not-allowed', id: 'service_ping_features_label' do
|
|
= _('Enable Registration Features')
|
|
= link_to sprite_icon('question-o'), help_page_path('development/service_ping/index.md', anchor: 'registration-features-program')
|
|
.form-text.text-muted
|
|
- if usage_ping_enabled
|
|
%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.')
|
|
- else
|
|
%p.gl-mb-3.text-muted{ id: 'service_ping_features_helper_text' }= _('To enable Registration Features, first enable Service Ping.')
|
|
|
|
%p.gl-mb-3.text-muted= _('Registration Features include:')
|
|
.form-text
|
|
- email_from_gitlab_path = help_page_path('tools/email.md')
|
|
- 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')
|
|
- link_end = '</a>'.html_safe
|
|
- email_from_gitlab_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: email_from_gitlab_path }
|
|
- 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 }
|
|
%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 }
|
|
%li
|
|
= _('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 }
|
|
%li
|
|
= _('Restrict group access by IP address. %{link_start}Learn more%{link_end}.').html_safe % { link_start: restrict_ip_link, link_end: link_end }
|
|
|
|
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"
|