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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
5 KiB
Text
Raw Normal View History

2021-09-30 23:02:18 +05:30
- payload_class = 'js-service-ping-payload'
2022-06-21 17:19:12 +05:30
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe
- link_end = '</a>'.html_safe
2020-11-24 15:15:51 +05:30
2022-06-21 17:19:12 +05:30
= gitlab_ui_form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), html: { class: 'fieldset-form' } do |f|
2022-10-11 01:57:18 +05:30
= form_errors(@application_setting)
2018-05-09 12:01:36 +05:30
%fieldset
2022-06-21 17:19:12 +05:30
.form-group
- help_link_start = link_start % { url: help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check') }
= f.gitlab_ui_checkbox_component :version_check_enabled, _('Enable version check'),
help_text: _("GitLab informs you if a new version is available. %{link_start}What information does GitLab Inc. collect?%{link_end}").html_safe % { link_start: help_link_start, link_end: link_end }
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?
2022-06-21 17:19:12 +05:30
- service_ping_link_start = link_start % { url: help_page_path('development/service_ping/index') }
2022-07-16 23:28:13 +05:30
- deactivating_service_ping_link_start = link_start % { url: help_page_path('user/admin_area/settings/usage_statistics', anchor: 'disable-usage-statistics-with-the-configuration-file') }
2022-06-21 17:19:12 +05:30
- usage_ping_help_text = s_('AdminSettings|To help improve GitLab and its user experience, GitLab periodically collects usage information. %{link_start}What information is shared with GitLab Inc.?%{link_end}').html_safe % { link_start: service_ping_link_start, link_end: link_end }
- disabled_help_text = s_('AdminSettings|Service ping is disabled in your configuration file, and cannot be enabled through this form. For more information, see the documentation on %{link_start}deactivating service ping%{link_end}.').html_safe % { link_start: deactivating_service_ping_link_start, link_end: link_end }
= f.gitlab_ui_checkbox_component :usage_ping_enabled, s_('AdminSettings|Enable Service Ping'),
help_text: can_be_configured ? usage_ping_help_text : disabled_help_text,
checkbox_options: { disabled: !can_be_configured, data: { qa_selector: 'enable_usage_data_checkbox' } }
.form-text.gl-pl-6
- if can_be_configured
2022-07-23 23:45:48 +05:30
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-payload-preview-trigger', data: { payload_selector: ".#{payload_class}" } }) do
2022-06-21 17:19:12 +05:30
= gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2')
.js-text.gl-display-inline= s_('AdminSettings|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) } }
2021-09-30 23:02:18 +05:30
.form-group
- usage_ping_enabled = @application_setting.usage_ping_enabled?
2022-06-21 17:19:12 +05:30
- label = s_('AdminSettings|Enable Registration Features')
2022-07-16 23:28:13 +05:30
- label_link = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/usage_statistics', anchor: 'registration-features-program')
2022-06-21 17:19:12 +05:30
- help_text = usage_ping_enabled ? s_('AdminSettings|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.') : s_('AdminSettings|To enable Registration Features, first enable Service Ping.')
= f.gitlab_ui_checkbox_component :usage_ping_features_enabled?, '%{label} %{label_link}'.html_safe % { label: label, label_link: label_link },
help_text: '<span id="service_ping_features_helper_text">%{help_text}</span>'.html_safe % { help_text: help_text },
checkbox_options: { id: 'application_setting_usage_ping_features_enabled' },
label_options: { id: 'service_ping_features_label' }
.form-text.gl-text-gray-500.gl-pl-6
%p.gl-mb-3= s_('AdminSettings|Registration Features include:')
- email_from_gitlab_path = help_page_path('user/admin_area/email_from_gitlab')
- repo_size_limit_path = help_page_path('user/admin_area/settings/account_and_limit_settings', anchor: 'repository-size-limit')
2022-08-27 11:52:29 +05:30
- restrict_ip_path = help_page_path('user/group/access_and_permissions', anchor: 'restrict-group-access-by-ip-address')
2022-06-21 17:19:12 +05:30
- email_from_gitlab_link = link_start % { url: email_from_gitlab_path }
- repo_size_limit_link = link_start % { url: repo_size_limit_path }
- restrict_ip_link = link_start % { url: restrict_ip_path }
%ul
%li
= s_('AdminSettings|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
= s_('AdminSettings|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
= s_('AdminSettings|Restrict group access by IP address. %{link_start}Learn more%{link_end}.').html_safe % { link_start: restrict_ip_link, link_end: link_end }
2018-05-09 12:01:36 +05:30
2022-11-25 23:54:43 +05:30
= f.submit _('Save changes'), pajamas_button: true