Commit cef99acd authored by Fatih Acet's avatar Fatih Acet

Merge branch '55344-frontend-instance-package-registry-settings' into 'master'

Add Package Registry settings to admin CI/CD settings

See merge request gitlab-org/gitlab!25120
parents b26cd5aa eab88cc6
......@@ -15,6 +15,8 @@
= render_if_exists 'admin/application_settings/required_instance_ci_setting', expanded: expanded_by_default?
= render_if_exists 'admin/application_settings/package_registry', expanded: expanded_by_default?
- if Gitlab.config.registry.enabled
%section.settings.as-registry.no-animate#js-registry-settings{ class: ('expanded' if expanded_by_default?) }
.settings-header
......
- if Feature.enabled?(:forward_npm_package_registry_requests) && 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.")
.settings-content
= form_for @application_setting, url: ci_cd_admin_application_settings_path(anchor: 'js-package-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
.form-check
= f.check_box :npm_package_requests_forwarding, class: 'form-check-input'
= f.label :npm_package_requests_forwarding, class: 'form-check-label' do
Enable forwarding of NPM package requests to npmjs.org
.form-text.text-muted
= _("When enabled, if an NPM package isn't found in the GitLab Registry, we will attempt to pull from the global NPM registry.")
= f.submit _('Save changes'), class: "btn btn-success"
......@@ -226,6 +226,21 @@ describe 'Admin updates EE-only settings' do
end
end
context 'package registry settings' do
before do
visit ci_cd_admin_application_settings_path
end
it 'allows you to change the npm_forwaring setting' do
page.within('#js-package-settings') do
check 'Enable forwarding of NPM package requests to npmjs.org'
click_button 'Save'
end
expect(current_settings.npm_package_requests_forwarding).to be true
end
end
def current_settings
ApplicationSetting.current_without_cache
end
......
......@@ -13481,6 +13481,9 @@ msgstr ""
msgid "Owner"
msgstr ""
msgid "Package Registry"
msgstr ""
msgid "Package deleted successfully"
msgstr ""
......@@ -17629,6 +17632,9 @@ msgstr ""
msgid "Settings"
msgstr ""
msgid "Settings related to the use and experience of using GitLab's Package Registry."
msgstr ""
msgid "Settings to prevent self-approval across all projects in the instance. Only an administrator can modify these settings."
msgstr ""
......@@ -21946,6 +21952,9 @@ msgstr ""
msgid "When enabled, any user visiting %{host} will be able to create an account."
msgstr ""
msgid "When enabled, if an NPM package isn't found in the GitLab Registry, we will attempt to pull from the global NPM registry."
msgstr ""
msgid "When enabled, users cannot use GitLab until the terms have been accepted."
msgstr ""
......
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