Commit b3638ce3 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch...

Merge branch '6098-extract-ee-specific-files-lines-for-app-views-admin-application_settings' into 'master'

Resolve "Extract EE specific files/lines for app/views/admin/application_settings"

Closes #6098

See merge request gitlab-org/gitlab-ee!9930
parents a5a87db6 3cab0329
......@@ -6,35 +6,35 @@
.form-check
= f.check_box :gravatar_enabled, class: 'form-check-input'
= f.label :gravatar_enabled, class: 'form-check-label' do
Gravatar enabled
= _('Gravatar enabled')
.form-group
= f.label :default_projects_limit, class: 'label-bold'
= f.number_field :default_projects_limit, class: 'form-control'
.form-group
= f.label :max_attachment_size, 'Maximum attachment size (MB)', class: 'label-bold'
= f.label :max_attachment_size, _('Maximum attachment size (MB)'), class: 'label-bold'
= f.number_field :max_attachment_size, class: 'form-control'
= render 'repository_size_limit_setting', form: f
= render_if_exists 'admin/application_settings/repository_size_limit_setting', form: f
.form-group
= f.label :receive_max_input_size, 'Maximum push size (MB)', class: 'label-light'
= f.label :receive_max_input_size, _('Maximum push size (MB)'), class: 'label-light'
= f.number_field :receive_max_input_size, class: 'form-control qa-receive-max-input-size-field'
.form-group
= f.label :session_expire_delay, 'Session duration (minutes)', class: 'label-light'
= f.label :session_expire_delay, _('Session duration (minutes)'), class: 'label-light'
= f.number_field :session_expire_delay, class: 'form-control'
%span.form-text.text-muted#session_expire_delay_help_block GitLab restart is required to apply changes
%span.form-text.text-muted#session_expire_delay_help_block= _('GitLab restart is required to apply changes')
.form-group
= f.label :user_oauth_applications, 'User OAuth applications', class: 'label-bold'
= f.label :user_oauth_applications, _('User OAuth applications'), class: 'label-bold'
.form-check
= f.check_box :user_oauth_applications, class: 'form-check-input'
= f.label :user_oauth_applications, class: 'form-check-label' do
Allow users to register any application to use GitLab as an OAuth provider
= _('Allow users to register any application to use GitLab as an OAuth provider')
.form-group
= f.label :user_default_external, 'New users set to external', class: 'label-bold'
= f.label :user_default_external, _('New users set to external'), class: 'label-bold'
.form-check
= f.check_box :user_default_external, class: 'form-check-input'
= f.label :user_default_external, class: 'form-check-label' do
Newly registered users will by default be external
= _('Newly registered users will by default be external')
.prepend-top-10
= _('Internal users')
= f.text_field :user_default_internal_regex, placeholder: _('Regex pattern'), class: 'form-control prepend-top-5'
......@@ -43,19 +43,12 @@
= link_to _('More information'), help_page_path('user/permissions', anchor: 'external-users-permissions'),
target: '_blank'
.form-group
= f.label :user_show_add_ssh_key_message, 'Prompt users to upload SSH keys', class: 'label-bold'
= f.label :user_show_add_ssh_key_message, _('Prompt users to upload SSH keys'), class: 'label-bold'
.form-check
= f.check_box :user_show_add_ssh_key_message, class: 'form-check-input'
= f.label :user_show_add_ssh_key_message, class: 'form-check-label' do
Inform users without uploaded SSH keys that they can't push over SSH until one is added
= _("Inform users without uploaded SSH keys that they can't push over SSH until one is added")
- if ::Gitlab.dev_env_or_com?
.form-group
= f.label :check_namespace_plan, 'Check feature availability on namespace plan', class: 'label-bold'
.form-check
= f.check_box :check_namespace_plan, class: 'form-check-input'
= f.label :check_namespace_plan, class: 'form-check-label' do
Enabling this will only make licensed EE features available to projects if the project namespace's plan
includes the feature or if the project is public.
= render_if_exists 'admin/application_settings/availability_on_namespace_setting', form: f
= f.submit 'Save changes', class: 'btn btn-success qa-save-changes-button'
= f.submit _('Save changes'), class: 'btn btn-success qa-save-changes-button'
......@@ -8,7 +8,7 @@
.form-check
= f.check_box :auto_devops_enabled, class: 'form-check-input'
= f.label :auto_devops_enabled, class: 'form-check-label' do
Default to Auto DevOps pipeline for all projects
= s_('CICD|Default to Auto DevOps pipeline for all projects')
.form-text.text-muted
= s_('CICD|The Auto DevOps pipeline will run if no alternative CI configuration file is found.')
= link_to _('More information'), help_page_path('topics/autodevops/index.md'), target: '_blank'
......@@ -21,37 +21,31 @@
.form-check
= f.check_box :shared_runners_enabled, class: 'form-check-input'
= f.label :shared_runners_enabled, class: 'form-check-label' do
Enable shared runners for new projects
= s_("AdminSettings|Enable shared runners for new projects")
= render 'shared_runners_minutes_setting', form: f
= render_if_exists 'admin/application_settings/shared_runners_minutes_setting', form: f
.form-group
= f.label :shared_runners_text, class: 'label-bold'
= f.text_area :shared_runners_text, class: 'form-control', rows: 4
.form-text.text-muted Markdown enabled
.form-text.text-muted= _("Markdown enabled")
.form-group
= f.label :max_artifacts_size, 'Maximum artifacts size (MB)', class: 'label-bold'
= f.label :max_artifacts_size, _('Maximum artifacts size (MB)'), class: 'label-bold'
= f.number_field :max_artifacts_size, class: 'form-control'
.form-text.text-muted
Set the maximum file size for each job's artifacts
= _("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')
.form-group
= f.label :default_artifacts_expire_in, 'Default artifacts expiration', class: 'label-bold'
= 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
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>4 mins 2 sec</code>, <code>2h42min</code>.
= _("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>4 mins 2 sec</code>, <code>2h42min</code>.").html_safe
= link_to icon('question-circle'), 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.label :archive_builds_in_human_readable, _('Archive jobs'), class: 'label-bold'
= f.text_field :archive_builds_in_human_readable, class: 'form-control', placeholder: 'never'
.form-text.text-muted
Set the duration for which the jobs will be considered as old and expired.
Once that time passes, the jobs will be archived and no longer able to be
retried. Make it empty to never expire jobs. It has to be no less than 1 day,
for example: <code>15 days</code>, <code>1 month</code>, <code>2 years</code>.
= _("Set the duration for which the jobs will be considered as old and expired. Once that time passes, the jobs will be archived and no longer able to be retried. Make it empty to never expire jobs. It has to be no less than 1 day, for example: <code>15 days</code>, <code>1 month</code>, <code>2 years</code>.").html_safe
.form-group
.form-check
= f.check_box :protected_ci_variables, class: 'form-check-input'
......@@ -60,4 +54,4 @@
.form-text.text-muted
= s_('AdminSettings|When creating a new environment variable it will be protected by default.')
= f.submit 'Save changes', class: "btn btn-success"
= f.submit _('Save changes'), class: "btn btn-success"
......@@ -6,33 +6,23 @@
.form-check
= f.check_box :email_author_in_body, class: 'form-check-input'
= f.label :email_author_in_body, class: 'form-check-label' do
Include author name in notification email body
= _('Include author name in notification email body')
.form-text.text-muted
Some email servers do not support overriding the email sender name.
Enable this option to include the name of the author of the issue,
merge request or comment in the email body instead.
= _('Some email servers do not support overriding the email sender name. Enable this option to include the name of the author of the issue, merge request or comment in the email body instead.')
.form-group
.form-check
= f.check_box :html_emails_enabled, class: 'form-check-input'
= f.label :html_emails_enabled, class: 'form-check-label' do
Enable HTML emails
= _('Enable HTML emails')
.form-text.text-muted
By default GitLab sends emails in HTML and plain text formats so mail
clients can choose what format to use. Disable this option if you only
want to send emails in plain text format.
= _('By default GitLab sends emails in HTML and plain text formats so mail clients can choose what format to use. Disable this option if you only want to send emails in plain text format.')
.form-group
= f.label :commit_email_hostname, _('Custom hostname (for private commit emails)'), class: 'label-bold'
= f.text_field :commit_email_hostname, class: 'form-control'
.form-text.text-muted
- commit_email_hostname_docs_link = link_to _('Learn more'), help_page_path('user/admin_area/settings/email', anchor: 'custom-private-commit-email-hostname'), target: '_blank'
= _("This setting will update the hostname that is used to generate private commit emails. %{learn_more}").html_safe % { learn_more: commit_email_hostname_docs_link }
-# EE-specific start
- if License.feature_available?(:email_additional_text)
.form-group
= f.label :email_additional_text, _('Additional text'), class: 'label-bold'
= f.text_area :email_additional_text, class: 'form-control', maxlength: Gitlab::CurrentSettings.email_additional_text_character_limit, rows: 4
.form-text.text-muted
= _('Add additional text to appear in all email communications. %{character_limit} character limit') % { character_limit: number_with_delimiter(Gitlab::CurrentSettings.email_additional_text_character_limit) }
-# EE-specific end
= f.submit 'Save changes', class: "btn btn-success"
= render_if_exists 'admin/application_settings/email_additional_text_setting', form: f
= f.submit _('Save changes'), class: "btn btn-success"
......@@ -2,22 +2,20 @@
= form_errors(@application_setting)
%fieldset
.form-group
= f.label :help_text, class: 'label-bold'
= f.text_area :help_text, class: 'form-control', rows: 4
.form-text.text-muted Markdown enabled
= render_if_exists 'admin/application_settings/help_text_setting', form: f
.form-group
= f.label :help_page_text, class: 'label-bold'
= f.text_area :help_page_text, class: 'form-control', rows: 4
.form-text.text-muted Markdown enabled
.form-text.text-muted= _('Markdown enabled')
.form-group
.form-check
= f.check_box :help_page_hide_commercial_content, class: 'form-check-input'
= f.label :help_page_hide_commercial_content, class: 'form-check-label' do
Hide marketing-related entries from help
= _('Hide marketing-related entries from help')
.form-group
= f.label :help_page_support_url, 'Support page URL', class: 'label-bold'
= f.label :help_page_support_url, _('Support page URL'), class: 'label-bold'
= f.text_field :help_page_support_url, class: 'form-control', placeholder: 'http://company.example.com/getting-help', :'aria-describedby' => 'support_help_block'
%span.form-text.text-muted#support_help_block Alternate support URL for help page
%span.form-text.text-muted#support_help_block= _('Alternate support URL for help page')
= f.submit 'Save changes', class: "btn btn-success"
= f.submit _('Save changes'), class: "btn btn-success"
......@@ -3,16 +3,15 @@
%fieldset
.form-group
= f.label :mirror_available, 'Enable mirror configuration', class: 'label-bold'
= f.label :mirror_available, _('Enable mirror configuration'), class: 'label-bold'
.form-check
= f.check_box :mirror_available, class: 'form-check-input'
= f.label :mirror_available, class: 'form-check-label' do
Allow mirrors to be set up for projects
= _('Allow mirrors to be set up for projects')
%span.form-text.text-muted
If disabled, only admins will be able to set up mirrors in projects.
= _('If disabled, only admins will be able to set up mirrors in projects.')
= link_to icon('question-circle'), help_page_path('workflow/repository_mirroring')
- if Gitlab.com? && License.feature_available?(:repository_mirrors)
= render 'mirror_settings', f: f
= render_if_exists 'admin/application_settings/mirror_settings', form: f
= f.submit 'Save changes', class: "btn btn-success"
= f.submit _('Save changes'), class: "btn btn-success"
......@@ -5,7 +5,7 @@
.form-group
= f.label :default_branch_protection, class: 'label-bold'
= f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
= render partial: 'admin/application_settings/ee/project_creation_level', locals: { form: f, application_setting: @application_setting }
= render_if_exists 'admin/application_settings/project_creation_level', form: f, application_setting: @application_setting
.form-group.visibility-level-setting
= f.label :default_project_visibility, class: 'label-bold'
= render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: Project.new)
......@@ -23,44 +23,33 @@
.form-check
= level
%span.form-text.text-muted#restricted-visibility-help
Selected levels cannot be used by non-admin users for groups, projects or snippets.
If the public level is restricted, user profiles are only visible to logged in users.
= _('Selected levels cannot be used by non-admin users for groups, projects or snippets. If the public level is restricted, user profiles are only visible to logged in users.')
.form-group
= f.label :import_sources, class: 'label-bold'
= hidden_field_tag 'application_setting[import_sources][]'
- import_sources_checkboxes('import-sources-help', class: 'form-check-input').each do |source|
.form-check= source
%span.form-text.text-muted#import-sources-help
Enabled sources for code import during project creation. OmniAuth must be configured for GitHub
= _('Enabled sources for code import during project creation. OmniAuth must be configured for GitHub')
= link_to "(?)", help_page_path("integration/github")
, Bitbucket
= link_to "(?)", help_page_path("integration/bitbucket")
and GitLab.com
= link_to "(?)", help_page_path("integration/gitlab")
-# EE-only
- if ldap_enabled?
.form-group
= f.label :allow_group_owners_to_manage_ldap, 'LDAP settings', class: 'label-bold'
.form-check
= f.check_box :allow_group_owners_to_manage_ldap, class: 'form-check-input'
= f.label :allow_group_owners_to_manage_ldap, class: 'form-check-label' do
Allow group owners to manage LDAP-related settings
%span.form-text.text-muted
If checked, group owners can manage LDAP group links and LDAP member overrides
= link_to icon('question-circle'), help_page_path('administration/auth/ldap-ee')
= render_if_exists 'admin/application_settings/ldap_access_setting', form: f
.form-group
.form-check
= f.check_box :project_export_enabled, class: 'form-check-input'
= f.label :project_export_enabled, class: 'form-check-label' do
Project export enabled
= _('Project export enabled')
.form-group
%label.label-bold Enabled Git access protocols
%label.label-bold= _('Enabled Git access protocols')
= select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control')
%span.form-text.text-muted#clone-protocol-help
Allow only the selected protocols to be used for Git access.
= _('Allow only the selected protocols to be used for Git access.')
- ApplicationSetting::SUPPORTED_KEY_TYPES.each do |type|
- field_name = :"#{type}_key_restriction"
......@@ -68,4 +57,4 @@
= f.label field_name, "#{type.upcase} SSH keys", class: 'label-bold'
= f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control'
= f.submit 'Save changes', class: "btn btn-success"
= f.submit _('Save changes'), class: "btn btn-success"
- return unless ::Gitlab.dev_env_or_com?
- form = local_assigns.fetch(:form)
.form-group
= form.label :check_namespace_plan, _('Check feature availability on namespace plan'), class: 'label-bold'
.form-check
= form.check_box :check_namespace_plan, class: 'form-check-input'
= form.label :check_namespace_plan, class: 'form-check-label' do
= _("Enabling this will only make licensed EE features available to projects if the project namespace's plan includes the feature or if the project is public.")
- return unless License.feature_available?(:email_additional_text)
- form = local_assigns.fetch(:form)
.form-group
= form.label :email_additional_text, _('Additional text'), class: 'label-bold'
= form.text_area :email_additional_text, class: 'form-control', maxlength: Gitlab::CurrentSettings.email_additional_text_character_limit, rows: 4
.form-text.text-muted
= _('Add additional text to appear in all email communications. %{character_limit} character limit') % { character_limit: number_with_delimiter(Gitlab::CurrentSettings.email_additional_text_character_limit) }
- form = local_assigns.fetch(:form)
.form-group
= form.label :help_text, class: 'label-bold'
= form.text_area :help_text, class: 'form-control', rows: 4
.form-text.text-muted= _('Markdown enabled')
- return unless ldap_enabled?
- form = local_assigns.fetch(:form)
.form-group
= form.label :allow_group_owners_to_manage_ldap, _('LDAP settings'), class: 'label-bold'
.form-check
= form.check_box :allow_group_owners_to_manage_ldap, class: 'form-check-input'
= form.label :allow_group_owners_to_manage_ldap, class: 'form-check-label' do
= _('Allow group owners to manage LDAP-related settings')
%span.form-text.text-muted
= _('If checked, group owners can manage LDAP group links and LDAP member overrides')
= link_to icon('question-circle'), help_page_path('administration/auth/ldap-ee')
- return if !Gitlab.com? || !License.feature_available?(:repository_mirrors)
- form = local_assigns.fetch(:form)
.form-group
= f.label :mirror_max_delay, class: 'label-bold' do
Maximum delay (Minutes)
= f.number_field :mirror_max_delay, class: 'form-control', min: 0
= form.label :mirror_max_delay, class: 'label-bold' do
= _('Maximum delay (Minutes)')
= form.number_field :mirror_max_delay, class: 'form-control', min: 0
%span.form-text.text-muted#mirror_max_delay_help_block
Maximum time between updates that a mirror can have when scheduled to synchronize.
= _('Maximum time between updates that a mirror can have when scheduled to synchronize.')
.form-group
= f.label :mirror_max_capacity, class: 'label-bold' do
Maximum capacity
= f.number_field :mirror_max_capacity, class: 'form-control', min: 0
= form.label :mirror_max_capacity, class: 'label-bold' do
= _('Maximum capacity')
= form.number_field :mirror_max_capacity, class: 'form-control', min: 0
%span.form-text.text-muted#mirror_max_capacity_help_block
Maximum number of mirrors that can be synchronizing at the same time.
= _('Maximum number of mirrors that can be synchronizing at the same time.')
.form-group
= f.label :mirror_capacity_threshold, class: 'label-bold' do
Capacity threshold
= f.number_field :mirror_capacity_threshold, class: 'form-control', min: 0
= form.label :mirror_capacity_threshold, class: 'label-bold' do
= _('Capacity threshold')
= form.number_field :mirror_capacity_threshold, class: 'form-control', min: 0
%span.form-text.text-muted#mirror_capacity_threshold
Minimum capacity to be available before we schedule more mirrors preemptively.
= _('Minimum capacity to be available before we schedule more mirrors preemptively.')
......@@ -4,8 +4,8 @@
.form-group
= form.label :repository_size_limit, class: 'label-bold' do
Size limit per repository (MB)
= _('Size limit per repository (MB)')
= form.number_field :repository_size_limit, value: form.object.repository_size_limit.try(:to_mb), class: 'form-control', min: 0
%span.form-text.text-muted#repository_size_limit_help_block
Includes LFS objects. It can be overridden per group, or per project. 0 for unlimited.
= _('Includes LFS objects. It can be overridden per group, or per project. 0 for unlimited.')
= link_to icon('question-circle'), help_page_path("user/admin_area/settings/account_and_limit_settings")
.form-group
= form.label :shared_runners_minutes, 'Pipeline minutes quota', class: 'label-bold'
= form.label :shared_runners_minutes, _('Pipeline minutes quota'), class: 'label-bold'
= form.number_field :shared_runners_minutes, class: 'form-control'
.form-text.text-muted
Set the maximum number of pipeline minutes that a group can use on shared Runners per month.
0 for unlimited.
= _('Set the maximum number of pipeline minutes that a group can use on shared Runners per month. 0 for unlimited.')
= link_to icon('question-circle'), help_page_path("user/admin_area/settings/continuous_integration", anchor: "shared-runners-build-minutes-quota"), target: '_blank'
---
title: Extract EE specific files and externalize strings in admin application settings
merge_request: 9930
author:
type: other
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment