diff options
Diffstat (limited to 'app/views/admin/application_settings')
9 files changed, 55 insertions, 26 deletions
diff --git a/app/views/admin/application_settings/_performance_bar.html.haml b/app/views/admin/application_settings/_performance_bar.html.haml index ba7d747fa04..58ea2be8b61 100644 --- a/app/views/admin/application_settings/_performance_bar.html.haml +++ b/app/views/admin/application_settings/_performance_bar.html.haml @@ -6,7 +6,7 @@ .form-check = f.check_box :performance_bar_enabled, class: 'form-check-input', data: { qa_selector: 'enable_performance_bar_checkbox'} = f.label :performance_bar_enabled, class: 'form-check-label' do - = _("Allow non-administrators to access to the performance bar") + = _("Allow non-administrators access to the performance bar") .form-group = f.label :performance_bar_allowed_group_path, _('Allow access to members of the following group'), class: 'label-bold' = f.text_field :performance_bar_allowed_group_path, class: 'form-control gl-form-input', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path diff --git a/app/views/admin/application_settings/_protected_paths.html.haml b/app/views/admin/application_settings/_protected_paths.html.haml index 04b42f42014..d273c81f51d 100644 --- a/app/views/admin/application_settings/_protected_paths.html.haml +++ b/app/views/admin/application_settings/_protected_paths.html.haml @@ -2,30 +2,26 @@ = form_errors(@application_setting) %fieldset - - if omnibus_protected_paths_throttle? - .bs-callout.bs-callout-danger - - relative_url_link = 'https://docs.gitlab.com/ee/user/admin_area/settings/protected_paths.html#migrate-settings-from-gitlab-123-and-earlier' - - relative_url_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: relative_url_link } - = _("Omnibus Protected Paths throttle is active, and takes priority over these settings. From 12.4, Omnibus throttle is deprecated and will be removed in a future release. Please read the %{relative_url_link_start}Migrating Protected Paths documentation%{relative_url_link_end}.").html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } - .form-group .form-check = f.check_box :throttle_protected_paths_enabled, class: 'form-check-input' = f.label :throttle_protected_paths_enabled, class: 'form-check-label' do - = _('Enable protected paths rate limit') + = _('Enable rate limiting for POST requests to the specified paths') %span.form-text.text-muted - = _('Helps reduce request volume for protected paths') + = _('Helps reduce request volume for protected paths.') .form-group - = f.label :throttle_protected_paths_requests_per_period, 'Max requests per period per user', class: 'label-bold' + = f.label :throttle_protected_paths_requests_per_period, 'Maximum requests per period per user', class: 'label-bold' = f.number_field :throttle_protected_paths_requests_per_period, class: 'form-control gl-form-input' .form-group - = f.label :throttle_protected_paths_period_in_seconds, 'Rate limit period in seconds', class: 'label-bold' + = f.label :throttle_protected_paths_period_in_seconds, 'Rate limit period (in seconds)', class: 'label-bold' = f.number_field :throttle_protected_paths_period_in_seconds, class: 'form-control gl-form-input' .form-group = f.label :protected_paths, class: 'label-bold' do + = _('Paths to protect with rate limiting') + = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10 + %span.form-text.text-muted - relative_url_link = 'https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab' - relative_url_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: relative_url_link } - = _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URL%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } - = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10 + = _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URLs%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } = f.submit _('Save changes'), class: 'gl-button btn btn-confirm' diff --git a/app/views/admin/application_settings/_sentry.html.haml b/app/views/admin/application_settings/_sentry.html.haml new file mode 100644 index 00000000000..5fd373d59e9 --- /dev/null +++ b/app/views/admin/application_settings/_sentry.html.haml @@ -0,0 +1,22 @@ += form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-sentry-settings'), html: { class: 'fieldset-form', id: 'sentry-settings' } do |f| + = form_errors(@application_setting) + + %span.text-muted + = _('Changing any setting here requires an application restart') + + %fieldset + .form-group + .form-check + = f.check_box :sentry_enabled, class: 'form-check-input' + = f.label :sentry_enabled, _('Enable Sentry error tracking'), class: 'form-check-label' + .form-group + = f.label :sentry_dsn, _('DSN'), class: 'label-light' + = f.text_field :sentry_dsn, class: 'form-control gl-form-input', placeholder: 'https://public@sentry.example.com/1' + .form-group + = f.label :sentry_clientside_dsn, _('Clientside DSN'), class: 'label-light' + = f.text_field :sentry_clientside_dsn, class: 'form-control gl-form-input', placeholder: 'https://public@sentry.example.com/2' + .form-group + = f.label :sentry_environment, _('Environment'), class: 'label-light' + = f.text_field :sentry_environment, class: 'form-control gl-form-input', placeholder: Rails.env + + = f.submit _('Save changes'), class: 'gl-button btn btn-confirm' diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 5bdad50c161..4fba1aee12d 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -15,7 +15,7 @@ .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.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input', data: { qa_selector: 'enable_usage_data_checkbox' } = f.label :usage_ping_enabled, class: 'form-check-label' do = _('Enable Service Ping') .form-text.text-muted diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml index b6266c3ea34..e56c898b236 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -1,13 +1,11 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form', id: 'visibility-settings' } do |f| += gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form', id: 'visibility-settings' } do |f| = form_errors(@application_setting) %fieldset - = render 'shared/default_branch_protection', f: f, selected_level: @application_setting.default_branch_protection + = render 'shared/default_branch_protection', f: f = render_if_exists 'admin/application_settings/group_owners_can_manage_default_branch_protection_setting', form: f - .form-group - = f.label s_('ProjectCreationLevel|Default project creation protection'), class: 'label-bold' - = f.select :default_project_creation, options_for_select(Gitlab::Access.project_creation_options, @application_setting.default_project_creation), {}, class: 'form-control' + = render 'shared/project_creation_levels', f: f, method: :default_project_creation, legend: s_('ProjectCreationLevel|Default project creation protection') = render_if_exists 'admin/application_settings/default_project_deletion_protection_setting', form: f = render_if_exists 'admin/application_settings/default_delayed_project_deletion_setting', form: f = render_if_exists 'admin/application_settings/default_project_deletion_adjourned_period_setting', form: f diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index a72c96bb577..53ba626760b 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -80,7 +80,7 @@ = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set the maximum session time for a web terminal.') - = link_to _('How do I use a web terminal?'), help_page_path('ci/environments/index.md', anchor: 'web-terminals'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('How do I use a web terminal?'), help_page_path('ci/environments/index.md', anchor: 'web-terminals-deprecated'), target: '_blank', rel: 'noopener noreferrer' .settings-content = render 'terminal' diff --git a/app/views/admin/application_settings/metrics_and_profiling.html.haml b/app/views/admin/application_settings/metrics_and_profiling.html.haml index 6087551d7c7..7cb5760f62a 100644 --- a/app/views/admin/application_settings/metrics_and_profiling.html.haml +++ b/app/views/admin/application_settings/metrics_and_profiling.html.haml @@ -42,7 +42,7 @@ .js-self-monitoring-settings{ data: self_monitoring_project_data } -%section.settings.as-usage.no-animate#js-usage-settings{ class: ('expanded' if expanded_by_default?) } +%section.settings.as-usage.no-animate#js-usage-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'usage_statistics_settings_content' } } .settings-header#usage-statistics %h4 = _('Usage statistics') @@ -54,3 +54,15 @@ = render 'usage' = render_if_exists 'admin/application_settings/pseudonymizer_settings', expanded: expanded_by_default? + +- if Feature.enabled?(:configure_sentry_in_application_settings, default_enabled: :yaml) + %section.settings.as-sentry.no-animate#js-sentry-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'sentry_settings_content' } } + .settings-header + %h4 + = _('Sentry') + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = expanded_by_default? ? _('Collapse') : _('Expand') + %p + = _('Configure Sentry integration for error tracking') + .settings-content + = render 'sentry' diff --git a/app/views/admin/application_settings/network.html.haml b/app/views/admin/application_settings/network.html.haml index 58e3f3f1136..3a053205725 100644 --- a/app/views/admin/application_settings/network.html.haml +++ b/app/views/admin/application_settings/network.html.haml @@ -87,14 +87,12 @@ %section.settings.as-protected-paths.no-animate#js-protected-paths-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4 - = _('Protected Paths') + = _('Protected paths') %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded_by_default? ? _('Collapse') : _('Expand') %p - = _('Configure paths to be protected by Rack Attack.') - .help-block - = _('These paths are protected for POST requests.') - = link_to _('More information'), help_page_path('security/rack_attack', anchor: 'protected-paths-throttle'), target: '_blank' + = _('Rate limit access to specified paths.') + = link_to _('Learn more.'), help_page_path('user/admin_area/settings/protected_paths.md'), target: '_blank', rel: 'noopener noreferrer' .settings-content = render 'protected_paths' diff --git a/app/views/admin/application_settings/reporting.html.haml b/app/views/admin/application_settings/reporting.html.haml index d2e118f0624..ae6243c3b50 100644 --- a/app/views/admin/application_settings/reporting.html.haml +++ b/app/views/admin/application_settings/reporting.html.haml @@ -13,6 +13,9 @@ .settings-content = render 'spam' +-# this partial is from JiHu, see details in https://gitlab.com/gitlab-jh/gitlab/-/merge_requests/135 += render_if_exists 'admin/application_settings/content_validation_section' + %section.settings.as-abuse.no-animate#js-abuse-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4 |