Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2018-08-07 00:51:37 +0300
committerClement Ho <clemmakesapps@gmail.com>2018-08-07 00:51:37 +0300
commitac1d83c56b4aa550761a13f25d7650c94194553f (patch)
treea4ab1c6cdd871dd6f4134387bed9da4021c0ec0d /app/views/projects/settings/ci_cd/_autodevops_form.html.haml
parentd737abc537476bf2b500f550b0c733d22f338cf1 (diff)
parente3127132a498cd3a39a325a5c0912ca6121e2f8a (diff)
Merge branch '47156-improve-auto-devops-settings' into 'master'
Resolve "Improve Auto DevOps settings flow for admin and project" Closes #47156 See merge request gitlab-org/gitlab-ce!20946
Diffstat (limited to 'app/views/projects/settings/ci_cd/_autodevops_form.html.haml')
-rw-r--r--app/views/projects/settings/ci_cd/_autodevops_form.html.haml37
1 files changed, 10 insertions, 27 deletions
diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
index 31c2616d283..7d878b38e85 100644
--- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
+++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
@@ -13,23 +13,15 @@
.card.auto-devops-card
.card-body
.form-check
- = form.radio_button :enabled, 'true', class: 'form-check-input js-toggle-extra-settings'
- = form.label :enabled_true, class: 'form-check-label' do
- %strong= s_('CICD|Enable Auto DevOps')
+ = form.check_box :enabled, class: 'form-check-input js-toggle-extra-settings', checked: @project.auto_devops_enabled?
+ = form.label :enabled, class: 'form-check-label' do
+ %strong= s_('CICD|Default to Auto DevOps pipeline')
+ - if @project.has_auto_devops_implicitly_enabled?
+ %span.badge.badge-info.js-instance-default-badge= s_('CICD|instance enabled')
.form-text.text-muted
- = s_('CICD|The Auto DevOps pipeline configuration will be used when there is no %{ci_file} in the project.').html_safe % { ci_file: ci_file_formatted }
-
- .card.auto-devops-card
- .card-body
- .form-check
- = form.radio_button :enabled, '', class: 'form-check-input js-toggle-extra-settings'
- = form.label :enabled_, class: 'form-check-label' do
- %strong= s_('CICD|Instance default (%{state})') % { state: "#{Gitlab::CurrentSettings.auto_devops_enabled? ? _('enabled') : _('disabled')}" }
- .form-text.text-muted
- = s_('CICD|Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific %{ci_file}.').html_safe % { ci_file: ci_file_formatted }
-
- .card.auto-devops-card.js-extra-settings{ class: form.object&.enabled == false ? 'hidden' : nil }
- .card-body.bg-light
+ = 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'
+ .card-footer.js-extra-settings{ class: @project.auto_devops_enabled? || 'hidden' }
= form.label :domain do
%strong= _('Domain')
= form.text_field :domain, class: 'form-control', placeholder: 'domain.com'
@@ -46,21 +38,12 @@
.form-check
= form.radio_button :deploy_strategy, 'continuous', class: 'form-check-input'
= form.label :deploy_strategy_continuous, class: 'form-check-label' do
- %strong= s_('CICD|Continuous deployment to production')
+ = s_('CICD|Continuous deployment to production')
= link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'auto-deploy'), target: '_blank'
.form-check
= form.radio_button :deploy_strategy, 'manual', class: 'form-check-input'
= form.label :deploy_strategy_manual, class: 'form-check-label' do
- %strong= s_('CICD|Automatic deployment to staging, manual deployment to production')
+ = s_('CICD|Automatic deployment to staging, manual deployment to production')
= link_to icon('question-circle'), help_page_path('ci/environments.md', anchor: 'manually-deploying-to-environments'), target: '_blank'
- .card.auto-devops-card
- .card-body
- .form-check
- = form.radio_button :enabled, 'false', class: 'form-check-input js-toggle-extra-settings', data: { hide_extra_settings: true }
- = form.label :enabled_false, class: 'form-check-label' do
- %strong= s_('CICD|Disable Auto DevOps')
- .form-text.text-muted
- = s_('CICD|An explicit %{ci_file} needs to be specified before you can begin using Continuous Integration and Delivery.').html_safe % { ci_file: ci_file_formatted }
-
= f.submit _('Save changes'), class: "btn btn-success prepend-top-15"