diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-03-12 13:15:33 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-03-12 13:15:33 +0300 |
commit | 7e9348f3594ee158dfd4aaa9e03e5bb5dd36aead (patch) | |
tree | 74e03ba375331ab619a766d5d2a3c12aaa267095 /app/views/projects/settings/ci_cd/_autodevops_form.html.haml | |
parent | db37b5a4c8d408e1bce0843162c609dcb1781188 (diff) |
Enable/disable Auto DevOps at Group level
- Includes instance methods on Group model to detect when a group has
AutoDevOps explicitly/implicitly enabled/disabled.
- Includes migration to add a new column to namespaces table
- Add UI necessary modifications
- Add service and controller to update auto devops
related instances
- Updates project and groups auto devops badges
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52447
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.haml | 8 |
1 files changed, 4 insertions, 4 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 8c4d1c32ebe..fac68a36e79 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -8,15 +8,15 @@ .card.auto-devops-card .card-body .form-check - = form.check_box :enabled, class: 'form-check-input js-toggle-extra-settings', checked: @project.auto_devops_enabled? + = form.check_box :enabled, class: 'form-check-input js-toggle-extra-settings', checked: 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') + - if auto_devops_enabled + %span.badge.badge-info.js-instance-default-badge= badge_for_auto_devops_scope(@project) .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' - .card-footer.js-extra-settings{ class: @project.auto_devops_enabled? || 'hidden' } + .card-footer.js-extra-settings{ class: auto_devops_enabled || 'hidden' } %p.settings-message.text-center - kubernetes_cluster_link = help_page_path('user/project/clusters/index') - kubernetes_cluster_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: kubernetes_cluster_link } |