diff options
Diffstat (limited to 'app/views/admin/application_settings')
20 files changed, 113 insertions, 31 deletions
diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index 7051b790fb7..b9cce6c8085 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -34,13 +34,13 @@ = f.number_field :max_artifacts_size, class: 'form-control' .form-text.text-muted = _("Set the maximum file size for each job's artifacts") - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size-core-only') + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size') .form-group = f.label :default_artifacts_expire_in, _('Default artifacts expiration'), class: 'label-bold' = f.text_field :default_artifacts_expire_in, class: 'form-control' .form-text.text-muted = html_escape(_("Set the default expiration time for each job's artifacts. 0 for unlimited. The default unit is in seconds, but you can define an alternative. For example: %{code_open}4 mins 2 sec%{code_close}, %{code_open}2h42min%{code_close}.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration-core-only') + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration') .form-group = f.label :archive_builds_in_human_readable, _('Archive jobs'), class: 'label-bold' = f.text_field :archive_builds_in_human_readable, class: 'form-control', placeholder: 'never' @@ -58,6 +58,6 @@ = f.text_field :default_ci_config_path, class: 'form-control', placeholder: '.gitlab-ci.yml' %p.form-text.text-muted = _("The default CI configuration path for new projects.").html_safe - = link_to icon('question-circle'), help_page_path('ci/pipelines/settings', anchor: 'custom-ci-configuration-path'), target: '_blank' + = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'custom-ci-configuration-path'), target: '_blank' = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/admin/application_settings/_diff_limits.html.haml b/app/views/admin/application_settings/_diff_limits.html.haml index 16b7fbe1ab6..1bf25b6a558 100644 --- a/app/views/admin/application_settings/_diff_limits.html.haml +++ b/app/views/admin/application_settings/_diff_limits.html.haml @@ -9,7 +9,7 @@ Diff files surpassing this limit will be presented as 'too large' and won't be expandable. - = link_to icon('question-circle'), + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/diff_limits', anchor: 'maximum-diff-patch-size') .gl-display-flex.gl-justify-content-end diff --git a/app/views/admin/application_settings/_external_authorization_service_form.html.haml b/app/views/admin/application_settings/_external_authorization_service_form.html.haml index e82ed0db851..179eb2d5f2e 100644 --- a/app/views/admin/application_settings/_external_authorization_service_form.html.haml +++ b/app/views/admin/application_settings/_external_authorization_service_form.html.haml @@ -19,7 +19,7 @@ = _('Enable classification control using an external service') %span.form-text.text-muted = external_authorization_description - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/external_authorization') + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/external_authorization') .form-group = f.label :external_authorization_service_url, _('Service URL'), class: 'label-bold' = f.text_field :external_authorization_service_url, class: 'form-control' diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml new file mode 100644 index 00000000000..bbad5155ada --- /dev/null +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -0,0 +1,30 @@ +- return unless Gitlab::Gitpod.feature_available? +- expanded = integration_expanded?('gitpod_') +- gitpod_link = link_to("Gitpod#{sprite_icon('external-link', size: 12, css_class: 'ml-1 vertical-align-center')}".html_safe, 'https://gitpod.io/', target: '_blank', rel: 'noopener noreferrer') + +%section.settings.no-animate#js-gitpod-settings{ class: ('expanded' if expanded) } + .settings-header + %h4 + = _('Gitpod') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + = s_('Enable %{gitpod_link} integration to launch a development environment in your browser directly from GitLab.').html_safe % { gitpod_link: gitpod_link } + = link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information') + + + .settings-content + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-gitpod-settings'), html: { class: 'fieldset-form' } do |f| + = form_errors(@application_setting) + + %fieldset + .form-group + .form-check + = f.check_box :gitpod_enabled, class: 'form-check-input' + = f.label :gitpod_enabled, s_('Gitpod|Enable Gitpod integration'), class: 'form-check-label' + .form-group + = f.label :gitpod_url, s_('Gitpod|Gitpod URL'), class: 'label-bold' + = f.text_field :gitpod_url, class: 'form-control', placeholder: s_('Gitpod|e.g. https://gitpod.example.com') + .form-text.text-muted + = s_('Gitpod|Add the URL to your Gitpod instance configured to read your GitLab projects.') + = f.submit s_('Save changes'), class: 'btn btn-success' diff --git a/app/views/admin/application_settings/_grafana.html.haml b/app/views/admin/application_settings/_grafana.html.haml index 700be7db54f..80ff5a298b4 100644 --- a/app/views/admin/application_settings/_grafana.html.haml +++ b/app/views/admin/application_settings/_grafana.html.haml @@ -4,7 +4,7 @@ %fieldset %p = _("Add a Grafana button in the admin sidebar, monitoring section, to access a variety of statistics on the health and performance of GitLab.") - = link_to icon('question-circle'), help_page_path('administration/monitoring/performance/grafana_configuration.md') + = link_to sprite_icon('question-o'), help_page_path('administration/monitoring/performance/grafana_configuration.md') .form-group .form-check = f.check_box :grafana_enabled, class: 'form-check-input' diff --git a/app/views/admin/application_settings/_package_registry.html.haml b/app/views/admin/application_settings/_package_registry.html.haml new file mode 100644 index 00000000000..257a90252cc --- /dev/null +++ b/app/views/admin/application_settings/_package_registry.html.haml @@ -0,0 +1,50 @@ +- if Gitlab.config.packages.enabled + %section.settings.as-package.no-animate#js-package-settings{ class: ('expanded' if expanded_by_default?) } + .settings-header + %h4 + = _('Package Registry') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded_by_default? ? _('Collapse') : _('Expand') + %p + = _("Settings related to the use and experience of using GitLab's Package Registry.") + + = render_if_exists 'admin/application_settings/ee_package_registry' + + .settings-content + %h4 + = _('Package file size limits') + %p + = _('Set limit to 0 to allow any file size.') + .scrolling-tabs-container.inner-page-scroll-tabs + - if @plans.size > 1 + %ul.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs.mb-3 + - @plans.each_with_index do |plan, index| + %li + = link_to admin_plan_limits_path(anchor: 'js-package-settings'), data: { target: "div#plan#{index}", action: "plan#{index}", toggle: 'tab'}, class: index == 0 ? 'active': '' do + = plan.name.capitalize + .tab-content + - @plans.each_with_index do |plan, index| + .tab-pane{ :id => "plan#{index}", class: index == 0 ? 'active': '' } + = form_for plan.actual_limits, url: admin_plan_limits_path(anchor: 'js-package-settings'), html: { class: 'fieldset-form' }, method: :post do |f| + = form_errors(plan) + %fieldset + = f.hidden_field(:plan_id, value: plan.id) + .form-group + = f.label :conan_max_file_size, _('Maximum Conan package file size in bytes'), class: 'label-bold' + = f.number_field :conan_max_file_size, class: 'form-control' + .form-group + = f.label :maven_max_file_size, _('Maximum Maven package file size in bytes'), class: 'label-bold' + = f.number_field :maven_max_file_size, class: 'form-control' + .form-group + = f.label :npm_max_file_size, _('Maximum NPM package file size in bytes'), class: 'label-bold' + = f.number_field :npm_max_file_size, class: 'form-control' + .form-group + = f.label :nuget_max_file_size, _('Maximum NuGet package file size in bytes'), class: 'label-bold' + = f.number_field :nuget_max_file_size, class: 'form-control' + .form-group + = f.label :pypi_max_file_size, _('Maximum PyPI package file size in bytes'), class: 'label-bold' + = f.number_field :pypi_max_file_size, class: 'form-control' + .form-group + = f.label :generic_packages_max_file_size, _('Generic package file size in bytes'), class: 'label-bold' + = f.number_field :generic_packages_max_file_size, class: 'form-control' + = f.submit _('Save %{name} size limits').html_safe % { name: plan.name.capitalize }, class: 'btn gl-button btn-success' diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 8214cf8ce9f..2ee7f3edc97 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -14,7 +14,7 @@ = _("Require users to prove ownership of custom domains") .form-text.text-muted = _("Domain verification is an essential security measure for public GitLab sites. Users are required to demonstrate they control a domain before it is enabled") - = link_to icon('question-circle'), help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index.md', anchor: '4-verify-the-domains-ownership') + = link_to sprite_icon('question-o'), help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index.md', anchor: '4-verify-the-domains-ownership') - if Gitlab.config.pages.access_control .form-group .form-check @@ -23,7 +23,7 @@ = _("Disable public access to Pages sites") .form-text.text-muted = _("Access to Pages websites are controlled based on the user's membership to a given project. By checking this box, users will be required to be logged in to have access to all Pages websites in your instance.") - = link_to icon('question-circle'), help_page_path('administration/pages/index.md', anchor: 'disabling-public-access-to-all-pages-websites') + = link_to sprite_icon('question-o'), help_page_path('administration/pages/index.md', anchor: 'disabling-public-access-to-all-pages-websites') %h5 = _("Configure Let's Encrypt") %p diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml index 6b02521a0f0..3473c185dbe 100644 --- a/app/views/admin/application_settings/_performance.html.haml +++ b/app/views/admin/application_settings/_performance.html.haml @@ -13,7 +13,7 @@ to authenticate SSH keys via the database file. Only uncheck this if you have configured your OpenSSH server to use the AuthorizedKeysCommand. Click on the help icon for more details. - = link_to icon('question-circle'), help_page_path('administration/operations/fast_ssh_key_lookup') + = link_to sprite_icon('question-o'), help_page_path('administration/operations/fast_ssh_key_lookup') .form-group = f.label :raw_blob_request_limit, _('Raw blob request rate limit per minute'), class: 'label-bold' diff --git a/app/views/admin/application_settings/_prometheus.html.haml b/app/views/admin/application_settings/_prometheus.html.haml index b2ec25cdf8d..49f58449d29 100644 --- a/app/views/admin/application_settings/_prometheus.html.haml +++ b/app/views/admin/application_settings/_prometheus.html.haml @@ -10,7 +10,7 @@ \. This setting requires a = link_to 'restart', help_page_path('administration/restart_gitlab') to take effect. - = link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/index') + = link_to sprite_icon('question-o'), help_page_path('administration/monitoring/prometheus/index') .form-group .form-check = f.check_box :prometheus_metrics_enabled, class: 'form-check-input' @@ -22,7 +22,7 @@ Environment variable %code prometheus_multiproc_dir does not exist or is not pointing to a valid directory. - = link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/gitlab_metrics', anchor: 'metrics-shared-directory') + = link_to sprite_icon('question-o'), help_page_path('administration/monitoring/prometheus/gitlab_metrics', anchor: 'metrics-shared-directory') .form-group = f.label :metrics_method_call_threshold, 'Method Call Threshold (ms)', class: 'label-bold' = f.number_field :metrics_method_call_threshold, class: 'form-control' diff --git a/app/views/admin/application_settings/_realtime.html.haml b/app/views/admin/application_settings/_realtime.html.haml index 8f6946534ea..0e9731b1c70 100644 --- a/app/views/admin/application_settings/_realtime.html.haml +++ b/app/views/admin/application_settings/_realtime.html.haml @@ -12,7 +12,6 @@ The multiplier can also have a decimal value. The default value (1) is a reasonable choice for the majority of GitLab installations. Set to 0 to completely disable polling. - = link_to icon('question-circle'), help_page_path('administration/polling') + = link_to sprite_icon('question-o'), help_page_path('administration/polling') = f.submit 'Save changes', class: "btn btn-success" - diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml index fea3ff4c3ba..7ff2b6e841d 100644 --- a/app/views/admin/application_settings/_registry.html.haml +++ b/app/views/admin/application_settings/_registry.html.haml @@ -10,9 +10,15 @@ = f.check_box :container_expiration_policies_enable_historic_entries, class: 'form-check-input' = f.label :container_expiration_policies_enable_historic_entries, class: 'form-check-label' do = _("Enable container expiration and retention policies for projects created earlier than GitLab 12.7.") - = link_to icon('question-circle'), help_page_path('user/packages/container_registry/index', anchor: 'cleanup-policy') + = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/index', anchor: 'cleanup-policy') .form-text.text-muted = _("Existing projects will be able to use expiration policies. Avoid enabling this if an external Container Registry is being used, as there is a performance risk if many images exist on one project.") - = link_to icon('question-circle'), help_page_path('user/packages/container_registry/index', anchor: 'use-with-external-container-registries') + = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/index', anchor: 'use-with-external-container-registries') + - if limit_delete_tags_service? + .form-group + = f.label :container_registry_delete_tags_service_timeout, _('Cleanup policy maximum processing time (seconds)'), class: 'label-bold' + = f.number_field :container_registry_delete_tags_service_timeout, min: 0, class: 'form-control' + .form-text.text-muted + = _("Tags are deleted until the timeout is reached. Any remaining tags are included the next time the policy runs. To remove the time limit, set it to 0.") = f.submit 'Save changes', class: "btn btn-success" diff --git a/app/views/admin/application_settings/_repository_mirrors_form.html.haml b/app/views/admin/application_settings/_repository_mirrors_form.html.haml index 3b1d1eceb9c..d598f173ff3 100644 --- a/app/views/admin/application_settings/_repository_mirrors_form.html.haml +++ b/app/views/admin/application_settings/_repository_mirrors_form.html.haml @@ -10,7 +10,7 @@ = _('Allow repository mirroring to be configured by project maintainers') %span.form-text.text-muted = _('If disabled, only admins will be able to configure repository mirroring.') - = link_to icon('question-circle'), help_page_path('user/project/repository/repository_mirroring.md') + = link_to sprite_icon('question-o'), help_page_path('user/project/repository/repository_mirroring.md') = render_if_exists 'admin/application_settings/mirror_settings', form: f diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index ee55529621b..0dc8dc0740e 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -16,7 +16,7 @@ .form-text %p.text-secondary = _('Enter weights for storages for new repositories.') - = link_to icon('question-circle'), help_page_path('administration/repository_storage_paths') + = link_to sprite_icon('question-o'), help_page_path('administration/repository_storage_paths') .form-check - storage_weights.each do |attribute| = f.text_field attribute[:name], class: 'form-text-input', value: attribute[:value] diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml index 505be869620..2a26a0909fd 100644 --- a/app/views/admin/application_settings/_signin.html.haml +++ b/app/views/admin/application_settings/_signin.html.haml @@ -38,7 +38,7 @@ = f.check_box :notify_on_unknown_sign_in, class: 'form-check-input' = f.label :notify_on_unknown_sign_in, class: 'form-check-label' do = _('Notify users by email when sign-in location is not recognized') - = link_to icon('question-circle'), + = link_to sprite_icon('question-o'), 'https://docs.gitlab.com/ee/user/profile/unknown_sign_in_notification.html', target: '_blank' .form-group diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index 3216d7b7a9a..c339d6df363 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -25,8 +25,5 @@ .form-group = f.label :snowplow_cookie_domain, _('Cookie domain'), class: 'label-light' = f.text_field :snowplow_cookie_domain, class: 'form-control' - .form-group - = f.label :snowplow_iglu_registry_url, _('Iglu registry URL (optional)'), class: 'label-light' - = f.text_field :snowplow_iglu_registry_url, class: 'form-control' = f.submit _('Save changes'), class: 'btn btn-success' diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index d8a4c601b77..4e45db1e10a 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -1,3 +1,5 @@ +- payload_class = 'js-usage-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) @@ -9,7 +11,7 @@ Enable version check .form-text.text-muted GitLab will inform you if a new version is available. - = link_to 'Learn more', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check-core-only') + = link_to 'Learn more', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check') about what information is shared with GitLab Inc. .form-group - can_be_configured = @application_setting.usage_ping_can_be_configured? @@ -21,21 +23,18 @@ - if can_be_configured %p.mb-2= _('To help improve GitLab and its user experience, GitLab will periodically collect usage information.') - - usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping-core-only') + - usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping') - 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' } + %button.btn.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } } .spinner.js-spinner.d-none .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) } } + %pre.usage-data.js-syntax-highlight.code.highlight.mt-2.d-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } - else = _('The usage ping is disabled, and cannot be configured through this form.') - deactivating_usage_ping_path = help_page_path('development/telemetry/usage_ping', anchor: 'disable-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 - = 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' = f.submit 'Save changes', class: "btn btn-success" diff --git a/app/views/admin/application_settings/ci/_header.html.haml b/app/views/admin/application_settings/ci/_header.html.haml index aa1a6256986..6ff35a42efd 100644 --- a/app/views/admin/application_settings/ci/_header.html.haml +++ b/app/views/admin/application_settings/ci/_header.html.haml @@ -2,7 +2,7 @@ %h4 = _('Variables') - = link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'custom-environment-variables'), target: '_blank', rel: 'noopener noreferrer' + = link_to sprite_icon('question-o', css_class: 'gl-vertical-align-baseline!'), help_page_path('ci/variables/README', anchor: 'custom-environment-variables'), target: '_blank', rel: 'noopener noreferrer' %button.btn.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 788dc0b0f1b..823cee09d4b 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -117,6 +117,7 @@ #js-maintenance-mode-settings = render_if_exists 'admin/application_settings/elasticsearch_form' += render 'admin/application_settings/gitpod' = render 'admin/application_settings/plantuml' = render 'admin/application_settings/sourcegraph' = render_if_exists 'admin/application_settings/slack' diff --git a/app/views/admin/application_settings/integrations.html.haml b/app/views/admin/application_settings/integrations.html.haml index b5dae424b46..ed4f63d0b82 100644 --- a/app/views/admin/application_settings/integrations.html.haml +++ b/app/views/admin/application_settings/integrations.html.haml @@ -16,5 +16,5 @@ %h4= s_('AdminSettings|Apply integration settings to all Projects') %p = s_('AdminSettings|Integrations configured here will automatically apply to all projects on this instance.') - = link_to _('Learn more'), '#' + = link_to _('Learn more'), integrations_help_page_path, target: '_blank', rel: 'noopener noreferrer' = render 'shared/integrations/index', integrations: @integrations 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 181c54c2716..9f1b7195ab7 100644 --- a/app/views/admin/application_settings/metrics_and_profiling.html.haml +++ b/app/views/admin/application_settings/metrics_and_profiling.html.haml @@ -32,7 +32,7 @@ = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Enable access to the Performance Bar for a given group.') - = link_to icon('question-circle'), help_page_path('administration/monitoring/performance/performance_bar') + = link_to sprite_icon('question-o'), help_page_path('administration/monitoring/performance/performance_bar') .settings-content = render 'performance_bar' |