Commit 6c4fcd8c authored by Scott Hampton's avatar Scott Hampton

Move required template form to EE

Moved files to ee directory
Added changelog
Updated gitlab.pot
parent c2da7ba0
import CiTemplate from './ci_template';
import CiTemplate from 'ee/pages/admin/application_settings/ci_cd/ci_template';
document.addEventListener('DOMContentLoaded', () => new CiTemplate());
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-required-pipeline-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
= f.label :shared_runners_text, s_('AdminSettings|Select a pipeline configuration file'), class: 'text-muted'
= dropdown_tag("Select a template", options: { toggle_class: 'js-ci-template-dropdown w-100', title: "Apply a template", filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls(nil) } } )
= f.text_field :shared_runners_text, value: @application_setting.shared_runners_text, id: 'required_template_name', class: 'hidden'
= f.submit _('Save changes'), class: "btn btn-success"
......@@ -13,16 +13,7 @@
.settings-content
= render 'ci_cd'
%section.settings.as-required-pipeline.no-animate#js-required-pipeline-settings{ class: ('expanded' if expanded_by_default?)}
.settings-header
%h4
= _('Required pipeline configuration')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }
= expanded_by_default? ? _('Collapse') : _('Expand')
%p
= ('Set an instance-wide auto included pipeline configuration. This pipeline configuration will be run after the project\'s own configuration.')
.settings-content
= render 'required_pipeline'
= render_if_exists 'admin/application_settings/required_pipeline', expanded: expanded_by_default?
- if Gitlab.config.registry.enabled
%section.settings.as-registry.no-animate#js-registry-settings{ class: ('expanded' if expanded_by_default?) }
......
......@@ -30,7 +30,7 @@ export default class CiTemplate {
return {
Reset: [
{
name: 'None',
name: 'No Required Pipeline',
id: '',
},
'divider',
......
-# TODO: Change all references to `shared_runners_text` to be `required_template_name`
- return unless License.feature_available?(:required_template_inclusion)
%section.settings.as-required-pipeline.no-animate#js-required-pipeline-settings{ class: ('expanded' if expanded)}
.settings-header
%h4
= s_('AdminSettings|Required pipeline configuration')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand')
%p
- link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/yaml/README') }
= s_('AdminSettings|Set an instance-wide auto included %{link_start}pipeline configuration%{link_end}. This pipeline configuration will be run after the project\'s own configuration.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
.settings-content
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-required-pipeline-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
= f.label :required_template_name, s_('AdminSettings|Select a pipeline configuration file'), class: 'text-muted'
= dropdown_tag(s_('AdminSettings|No Required Pipeline'), options: { toggle_class: 'js-ci-template-dropdown w-100', title: s_('AdminSettings|Select a Template'), filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls(nil) } } )
= f.text_field :required_template_name, value: @application_setting.required_template_name, id: 'required_template_name', class: 'hidden'
= f.submit _('Save changes'), class: "btn btn-success"
---
title: Add admin form to enforce a pipeline on an instance
merge_request: 13923
author:
type: added
......@@ -853,6 +853,21 @@ msgstr ""
msgid "AdminSettings|Environment variables are protected by default"
msgstr ""
msgid "AdminSettings|No Required Pipeline"
msgstr ""
msgid "AdminSettings|Required pipeline configuration"
msgstr ""
msgid "AdminSettings|Select a Template"
msgstr ""
msgid "AdminSettings|Select a pipeline configuration file"
msgstr ""
msgid "AdminSettings|Set an instance-wide auto included %{link_start}pipeline configuration%{link_end}. This pipeline configuration will be run after the project's own configuration."
msgstr ""
msgid "AdminSettings|Specify a domain to use by default for every project's Auto Review Apps and Auto Deploy stages."
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