From 64854ae395818c81b357d43fe076af7b81a3bb19 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 03:42:12 -0500 Subject: re-order autodevops options --- .../projects/settings/ci_cd/_autodevops_form.html.haml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 bbabb98dafe..f2e42848c11 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -17,13 +17,6 @@ %br = 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 } - .form-check - = form.radio_button :enabled, 'false', class: 'form-check-input' - = form.label :enabled_false, class: 'form-check-label' do - %strong= s_('CICD|Disable Auto DevOps') - %br - = 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 } - .form-check = form.radio_button :enabled, '', class: 'form-check-input' = form.label :enabled_, class: 'form-check-label' do @@ -31,6 +24,13 @@ %br = 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 } + .form-check + = form.radio_button :enabled, 'false', class: 'form-check-input' + = form.label :enabled_false, class: 'form-check-label' do + %strong= s_('CICD|Disable Auto DevOps') + %br + = 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 } + = form.label :domain, class:"prepend-top-10" do = _('Domain') = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' -- cgit v1.2.1 From c346e6474e1ef1740ec00d06d60ccaa5cf83f5bc Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 04:14:53 -0500 Subject: re-order and re-style autodevops form to match design --- .../settings/ci_cd/_autodevops_form.html.haml | 64 ++++++++++++---------- 1 file changed, 36 insertions(+), 28 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 f2e42848c11..92ee5fb95d5 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -2,7 +2,7 @@ .col-lg-12 = form_for @project, url: project_settings_ci_cd_path(@project) do |f| = form_errors(@project) - %fieldset.builds-feature + %fieldset.builds-feature.auto-devops-settings .form-group - message = auto_devops_warning_message(@project) - ci_file_formatted = '.gitlab-ci.yml'.html_safe @@ -10,34 +10,42 @@ %p.settings-message.text-center = message.html_safe = f.fields_for :auto_devops_attributes, @auto_devops do |form| - .form-check - = form.radio_button :enabled, 'true', class: 'form-check-input' - = form.label :enabled_true, class: 'form-check-label' do - %strong= s_('CICD|Enable Auto DevOps') - %br - = 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 + .card-body + .form-check + = form.radio_button :enabled, 'true', class: 'form-check-input' + = form.label :enabled_true, class: 'form-check-label' do + %strong= s_('CICD|Enable Auto DevOps') + .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 } - .form-check - = form.radio_button :enabled, '', class: 'form-check-input' - = form.label :enabled_, class: 'form-check-label' do - %strong= s_('CICD|Instance default (%{state})') % { state: "#{Gitlab::CurrentSettings.auto_devops_enabled? ? _('enabled') : _('disabled')}" } - %br - = 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 + .card-body + .form-check + = form.radio_button :enabled, '', class: 'form-check-input' + = 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 } - .form-check - = form.radio_button :enabled, 'false', class: 'form-check-input' - = form.label :enabled_false, class: 'form-check-label' do - %strong= s_('CICD|Disable Auto DevOps') - %br - = 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 } - - = form.label :domain, class:"prepend-top-10" do - = _('Domain') - = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' - .form-text.text-muted - = s_('CICD|A domain is required to use Auto Review Apps and Auto Deploy Stages.') - - if cluster_ingress_ip = cluster_ingress_ip(@project) - = s_('%{nip_domain} can be used as an alternative to a custom domain.').html_safe % { nip_domain: "#{cluster_ingress_ip}.nip.io".html_safe } - = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'auto-devops-base-domain'), target: '_blank' + .card + .card-body.bg-light + = form.label :domain do + %strong= _('Domain') + = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' + .form-text.text-muted + = s_('CICD|A domain is required to use Auto Review Apps and Auto Deploy Stages.') + - if cluster_ingress_ip = cluster_ingress_ip(@project) + = s_('%{nip_domain} can be used as an alternative to a custom domain.').html_safe % { nip_domain: "#{cluster_ingress_ip}.nip.io".html_safe } + = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'auto-devops-base-domain'), target: '_blank' + + .card + .card-body + .form-check + = form.radio_button :enabled, 'false', class: 'form-check-input' + = 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" -- cgit v1.2.1 From 2c11cab38c85a15b6f8f950d8c614fe601e51933 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 04:21:45 -0500 Subject: update wording of domain input subtext --- app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 92ee5fb95d5..96399433e07 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -1,4 +1,4 @@ -.row.prepend-top-default +.row .col-lg-12 = form_for @project, url: project_settings_ci_cd_path(@project) do |f| = form_errors(@project) @@ -34,7 +34,7 @@ %strong= _('Domain') = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' .form-text.text-muted - = s_('CICD|A domain is required to use Auto Review Apps and Auto Deploy Stages.') + = s_('CICD|You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages.') - if cluster_ingress_ip = cluster_ingress_ip(@project) = s_('%{nip_domain} can be used as an alternative to a custom domain.').html_safe % { nip_domain: "#{cluster_ingress_ip}.nip.io".html_safe } = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'auto-devops-base-domain'), target: '_blank' -- cgit v1.2.1 From 3c9686c96d46d1cd743179f5d3da179e4de6a428 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 31 May 2018 18:41:37 +0200 Subject: Rename Secret variables -> variables --- app/views/projects/settings/ci_cd/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/settings/ci_cd') diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index ed17bd4f7dc..ed118d1bcef 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -43,7 +43,7 @@ .settings-header %h4 = _('Variables') - = link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'secret-variables'), target: '_blank', rel: 'noopener noreferrer' + = link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'variables'), target: '_blank', rel: 'noopener noreferrer' %button.btn.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p.append-bottom-0 -- cgit v1.2.1 From d9c67a709be457457373ca87b015e846044bfff6 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 04:44:42 -0500 Subject: show/hide the extra auto devops settings when appropriate --- app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 96399433e07..4c25635be6f 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -13,7 +13,7 @@ .card .card-body .form-check - = form.radio_button :enabled, 'true', class: 'form-check-input' + = form.radio_button :enabled, 'true', class: 'form-check-input', data: { hide_extra_settings: false } = form.label :enabled_true, class: 'form-check-label' do %strong= s_('CICD|Enable Auto DevOps') .form-text.text-muted @@ -22,13 +22,13 @@ .card .card-body .form-check - = form.radio_button :enabled, '', class: 'form-check-input' + = form.radio_button :enabled, '', class: 'form-check-input', data: { hide_extra_settings: false } = 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 + .card.js-extra-settings{ class: form.object.enabled == false ? 'hidden' : nil } .card-body.bg-light = form.label :domain do %strong= _('Domain') @@ -42,7 +42,7 @@ .card .card-body .form-check - = form.radio_button :enabled, 'false', class: 'form-check-input' + = form.radio_button :enabled, 'false', class: 'form-check-input', data: { hide_extra_settings: true } = form.label :enabled_false, class: 'form-check-label' do %strong= s_('CICD|Disable Auto DevOps') .form-text.text-muted -- cgit v1.2.1 From 7830d406be6c9935e8a4c8a863ef1282163b6b19 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 05:07:32 -0500 Subject: add deploy strategy radio buttons --- .../projects/settings/ci_cd/_autodevops_form.html.haml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'app/views/projects/settings/ci_cd') 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 4c25635be6f..037c976f57a 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -38,7 +38,20 @@ - if cluster_ingress_ip = cluster_ingress_ip(@project) = s_('%{nip_domain} can be used as an alternative to a custom domain.').html_safe % { nip_domain: "#{cluster_ingress_ip}.nip.io".html_safe } = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'auto-devops-base-domain'), target: '_blank' - + + %label.prepend-top-10 + %strong= s_('CICD|Deployment strategy') + %p.settings-message.text-center + = s_('CICD|Deployment strategy needs a domain name to work correctly.') + .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') + .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') + .card .card-body .form-check -- cgit v1.2.1 From e2ff570f275da36eddc77b6ee60d075df10dbfc1 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 05:11:16 -0500 Subject: add help links to the deployment strategy options --- app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 2 ++ app/views/projects/settings/ci_cd/show.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 037c976f57a..c4677715104 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -47,10 +47,12 @@ = 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') + = 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') + = link_to icon('question-circle'), help_page_path('ci/environments.md', anchor: 'manually-deploying-to-environments'), target: '_blank' .card .card-body diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index ed17bd4f7dc..0b52cf6a4b4 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -16,12 +16,12 @@ .settings-content = render 'form' -%section.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded) } +%section.settings#autodevops-settings.no-animate{ class: ('expanded' if true) } .settings-header %h4 = s_('CICD|Auto DevOps') %button.btn.btn-default.js-settings-toggle{ type: 'button' } - = expanded ? _('Collapse') : _('Expand') + = true ? _('Collapse') : _('Expand') %p = s_('CICD|Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration.') = link_to s_('CICD|Learn more about Auto DevOps'), help_page_path('topics/autodevops/index.md') -- cgit v1.2.1 From c604c43782c5f2ac915f934d566f0502ae41f6d4 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 05:29:52 -0500 Subject: fix broken specs --- app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 c4677715104..ceb3597b5de 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -7,7 +7,7 @@ - message = auto_devops_warning_message(@project) - ci_file_formatted = '.gitlab-ci.yml'.html_safe - if message - %p.settings-message.text-center + %p.auto-devops-warning-message.settings-message.text-center = message.html_safe = f.fields_for :auto_devops_attributes, @auto_devops do |form| .card @@ -28,7 +28,7 @@ .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.js-extra-settings{ class: form.object.enabled == false ? 'hidden' : nil } + .card.js-extra-settings{ class: form.object&.enabled == false ? 'hidden' : nil } .card-body.bg-light = form.label :domain do %strong= _('Domain') -- cgit v1.2.1 From 41c17bdb572b9c2875facba5ff6d003e4cb6f23b Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 05:51:15 -0500 Subject: revert accidental commit --- app/views/projects/settings/ci_cd/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/projects/settings/ci_cd') diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 0b52cf6a4b4..ed17bd4f7dc 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -16,12 +16,12 @@ .settings-content = render 'form' -%section.settings#autodevops-settings.no-animate{ class: ('expanded' if true) } +%section.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 = s_('CICD|Auto DevOps') %button.btn.btn-default.js-settings-toggle{ type: 'button' } - = true ? _('Collapse') : _('Expand') + = expanded ? _('Collapse') : _('Expand') %p = s_('CICD|Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration.') = link_to s_('CICD|Learn more about Auto DevOps'), help_page_path('topics/autodevops/index.md') -- cgit v1.2.1 From ff582303a8340fdd4d7fc3c7fb32b07c4c2270fa Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 15:36:38 -0500 Subject: add custom card classes for autodevops settings --- app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 ceb3597b5de..12a60400a42 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -10,7 +10,7 @@ %p.auto-devops-warning-message.settings-message.text-center = message.html_safe = f.fields_for :auto_devops_attributes, @auto_devops do |form| - .card + .card.auto-devops-card .card-body .form-check = form.radio_button :enabled, 'true', class: 'form-check-input', data: { hide_extra_settings: false } @@ -19,7 +19,7 @@ .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 + .card.auto-devops-card .card-body .form-check = form.radio_button :enabled, '', class: 'form-check-input', data: { hide_extra_settings: false } @@ -28,7 +28,7 @@ .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.js-extra-settings{ class: form.object&.enabled == false ? 'hidden' : nil } + .card.auto-devops-card.js-extra-settings{ class: form.object&.enabled == false ? 'hidden' : nil } .card-body.bg-light = form.label :domain do %strong= _('Domain') @@ -54,7 +54,7 @@ %strong= 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 + .card.auto-devops-card .card-body .form-check = form.radio_button :enabled, 'false', class: 'form-check-input', data: { hide_extra_settings: true } -- cgit v1.2.1 From af261c1b314058c3aefef3377b9f7f8a20701481 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 15:48:54 -0500 Subject: attach a single event handler to detect radio button changes instead of one per input --- app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/settings/ci_cd') 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 12a60400a42..c3e10a93456 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -2,7 +2,7 @@ .col-lg-12 = form_for @project, url: project_settings_ci_cd_path(@project) do |f| = form_errors(@project) - %fieldset.builds-feature.auto-devops-settings + %fieldset.builds-feature.js-auto-devops-settings .form-group - message = auto_devops_warning_message(@project) - ci_file_formatted = '.gitlab-ci.yml'.html_safe -- cgit v1.2.1 From 0cb4bb1af8fb5b5c71a9b547114563ccec355979 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 6 Jun 2018 16:45:23 -0500 Subject: rely on presense or absense of data attribute instead of coerced boolean strings --- app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 c3e10a93456..4359362bb05 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -13,7 +13,7 @@ .card.auto-devops-card .card-body .form-check - = form.radio_button :enabled, 'true', class: 'form-check-input', data: { hide_extra_settings: false } + = 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-text.text-muted @@ -22,7 +22,7 @@ .card.auto-devops-card .card-body .form-check - = form.radio_button :enabled, '', class: 'form-check-input', data: { hide_extra_settings: false } + = 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 @@ -57,7 +57,7 @@ .card.auto-devops-card .card-body .form-check - = form.radio_button :enabled, 'false', class: 'form-check-input', data: { hide_extra_settings: true } + = 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 -- cgit v1.2.1 From 3dd19d8ac18a3c14471d16595e742cbceb4d3e94 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Thu, 7 Jun 2018 16:46:06 -0500 Subject: Fix revealing a CI runner token doesn't actually reveal it --- app/views/projects/settings/ci_cd/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/settings/ci_cd') diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index e93b240a007..7142a9d635e 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -7,7 +7,7 @@ = f.label :runners_token, "Runner token", class: 'label-light' .form-control.js-secret-value-placeholder = '*' * 20 - = f.text_field :runners_token, class: "form-control hidden js-secret-value", placeholder: 'xEeFCaDAB89' + = f.text_field :runners_token, class: "form-control hide js-secret-value", placeholder: 'xEeFCaDAB89' %p.form-text.text-muted The secure token used by the Runner to checkout the project %button.btn.btn-info.prepend-top-10.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: 'false' } } = _('Reveal value') -- cgit v1.2.1 From 6a077c545321cae350a8a36d2f03b25c6b1b30fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4mmerle?= Date: Fri, 8 Jun 2018 14:54:45 +0000 Subject: Update settings section titles --- app/views/projects/settings/ci_cd/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/projects/settings/ci_cd') diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index ed118d1bcef..3047207bca7 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -8,7 +8,7 @@ %section.settings#js-general-pipeline-settings.no-animate{ class: ('expanded' if general_expanded) } .settings-header %h4 - General pipelines settings + General pipelines %button.btn.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p @@ -31,7 +31,7 @@ %section.settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 - Runners settings + Runners %button.btn.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p -- cgit v1.2.1 From c24bca94fe40a97572179178fd5b5bace005d5a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 11 Jun 2018 18:27:08 +0200 Subject: Ensure we look into the correct setion only when expanding a settings' section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/views/projects/settings/ci_cd/show.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/projects/settings/ci_cd') diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 3047207bca7..56c175f5649 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -16,7 +16,7 @@ .settings-content = render 'form' -%section.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded) } +%section.qa-autodevops-settings.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 = s_('CICD|Auto DevOps') @@ -28,7 +28,7 @@ .settings-content = render 'autodevops_form' -%section.settings.no-animate{ class: ('expanded' if expanded) } +%section.qa-runners-settings.settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 Runners @@ -39,7 +39,7 @@ .settings-content = render 'projects/runners/index' -%section.settings.no-animate{ class: ('expanded' if expanded) } +%section.qa-variables-settings.settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 = _('Variables') -- cgit v1.2.1 From 26dd4b3b49118735f148a48df26f336749858362 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Wed, 27 Jun 2018 13:21:36 +0100 Subject: Adds an ID to the settings section to allow anchor linking --- app/views/projects/settings/ci_cd/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/settings/ci_cd') diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 56c175f5649..4d096699a70 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -51,7 +51,7 @@ .settings-content = render 'ci/variables/index', save_endpoint: project_variables_path(@project) -%section.settings.no-animate{ class: ('expanded' if expanded) } +%section.settings.no-animate#js-pipeline-triggers{ class: ('expanded' if expanded) } .settings-header %h4 Pipeline triggers -- cgit v1.2.1 From 9e99eb6ca05ddeef2cfd55f6f9a5f695dba49a45 Mon Sep 17 00:00:00 2001 From: Tao Wang Date: Thu, 14 Jun 2018 18:40:56 +1000 Subject: i18n: externalize strings from 'app/views/projects/settings' Signed-off-by: Tao Wang --- .../settings/ci_cd/_autodevops_form.html.haml | 2 +- app/views/projects/settings/ci_cd/_form.html.haml | 48 +++++++++++----------- app/views/projects/settings/ci_cd/show.html.haml | 26 ++++++------ 3 files changed, 36 insertions(+), 40 deletions(-) (limited to 'app/views/projects/settings/ci_cd') 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 4359362bb05..31c2616d283 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -63,4 +63,4 @@ .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" + = f.submit _('Save changes'), class: "btn btn-success prepend-top-15" diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 7142a9d635e..5025460a2d0 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -4,20 +4,20 @@ = form_errors(@project) %fieldset.builds-feature .form-group.append-bottom-default.js-secret-runner-token - = f.label :runners_token, "Runner token", class: 'label-light' + = f.label :runners_token, _("Runner token"), class: 'label-light' .form-control.js-secret-value-placeholder = '*' * 20 = f.text_field :runners_token, class: "form-control hide js-secret-value", placeholder: 'xEeFCaDAB89' - %p.form-text.text-muted The secure token used by the Runner to checkout the project + %p.form-text.text-muted= _("The secure token used by the Runner to checkout the project") %button.btn.btn-info.prepend-top-10.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: 'false' } } = _('Reveal value') %hr .form-group %h5.prepend-top-0 - Git strategy for pipelines + = _("Git strategy for pipelines") %p - Choose between clone or fetch to get the recent application code + = _("Choose between clone or fetch to get the recent application code") = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank' .form-check = f.radio_button :build_allow_git_fetch, 'false', { class: 'form-check-input' } @@ -25,29 +25,29 @@ %strong git clone %br %span.descr - Slower but makes sure the project workspace is pristine as it clones the repository from scratch for every job + = _("Slower but makes sure the project workspace is pristine as it clones the repository from scratch for every job") .form-check = f.radio_button :build_allow_git_fetch, 'true', { class: 'form-check-input' } = f.label :build_allow_git_fetch_true, class: 'form-check-label' do %strong git fetch %br %span.descr - Faster as it re-uses the project workspace (falling back to clone if it doesn't exist) + = _("Faster as it re-uses the project workspace (falling back to clone if it doesn't exist)") %hr .form-group - = f.label :build_timeout_human_readable, 'Timeout', class: 'label-light' + = f.label :build_timeout_human_readable, _('Timeout'), class: 'label-light' = f.text_field :build_timeout_human_readable, class: 'form-control' %p.form-text.text-muted - Per job. If a job passes this threshold, it will be marked as failed + = _("Per job. If a job passes this threshold, it will be marked as failed") = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'timeout'), target: '_blank' %hr .form-group - = f.label :ci_config_path, 'Custom CI config path', class: 'label-light' + = f.label :ci_config_path, _('Custom CI config path'), class: 'label-light' = f.text_field :ci_config_path, class: 'form-control', placeholder: '.gitlab-ci.yml' %p.form-text.text-muted - The path to CI config file. Defaults to .gitlab-ci.yml + = _("The path to CI config file. Defaults to .gitlab-ci.yml") = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'custom-ci-config-path'), target: '_blank' %hr @@ -55,36 +55,35 @@ .form-check = f.check_box :public_builds, { class: 'form-check-input' } = f.label :public_builds, class: 'form-check-label' do - %strong Public pipelines + %strong= _("Public pipelines") .form-text.text-muted - Allow public access to pipelines and job details, including output logs and artifacts + = _("Allow public access to pipelines and job details, including output logs and artifacts") = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'visibility-of-pipelines'), target: '_blank' .bs-callout.bs-callout-info - %p If enabled: + %p #{_("If enabled")}: %ul %li - For public projects, anyone can view pipelines and access job details (output logs and artifacts) + = _("For public projects, anyone can view pipelines and access job details (output logs and artifacts)") %li - For internal projects, any logged in user can view pipelines and access job details (output logs and artifacts) + = _("For internal projects, any logged in user can view pipelines and access job details (output logs and artifacts)") %li - For private projects, any member (guest or higher) can view pipelines and access job details (output logs and artifacts) + = _("For private projects, any member (guest or higher) can view pipelines and access job details (output logs and artifacts)") %p - If disabled, the access level will depend on the user's - permissions in the project. + = _("If disabled, the access level will depend on the user's permissions in the project.") %hr .form-group .form-check = f.check_box :auto_cancel_pending_pipelines, { class: 'form-check-input' }, 'enabled', 'disabled' = f.label :auto_cancel_pending_pipelines, class: 'form-check-label' do - %strong Auto-cancel redundant, pending pipelines + %strong= _("Auto-cancel redundant, pending pipelines") .form-text.text-muted - New pipelines will cancel older, pending pipelines on the same branch + = _("New pipelines will cancel older, pending pipelines on the same branch") = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'auto-cancel-pending-pipelines'), target: '_blank' %hr .form-group - = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' + = f.label :build_coverage_regex, _("Test coverage parsing"), class: 'label-light' .input-group %span.input-group-prepend .input-group-text / @@ -92,11 +91,10 @@ %span.input-group-append .input-group-text / %p.form-text.text-muted - A regular expression that will be used to find the test coverage - output in the job trace. Leave blank to disable + = _("A regular expression that will be used to find the test coverage output in the job trace. Leave blank to disable") = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'test-coverage-parsing'), target: '_blank' .bs-callout.bs-callout-info - %p Below are examples of regex for existing tools: + %p= _("Below are examples of regex for existing tools:") %ul %li Simplecov (Ruby) - @@ -120,7 +118,7 @@ JaCoCo (Java/Kotlin) %code Total.*?([0-9]{1,3})% - = f.submit 'Save changes', class: "btn btn-save" + = f.submit _('Save changes'), class: "btn btn-save" %hr diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 4d096699a70..be22bbd7a9b 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -1,6 +1,6 @@ - @content_class = "limit-container-width" unless fluid_layout -- page_title "CI / CD Settings" -- page_title "CI / CD" +- page_title _("CI / CD Settings") +- page_title _("CI / CD") - expanded = Rails.env.test? - general_expanded = @project.errors.empty? ? expanded : true @@ -8,11 +8,11 @@ %section.settings#js-general-pipeline-settings.no-animate{ class: ('expanded' if general_expanded) } .settings-header %h4 - General pipelines + = _("General pipelines") %button.btn.js-settings-toggle{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + = expanded ? _('Collapse') : _('Expand') %p - Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report. + = _("Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report.") .settings-content = render 'form' @@ -31,11 +31,11 @@ %section.qa-runners-settings.settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 - Runners + = _("Runners") %button.btn.js-settings-toggle{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + = expanded ? _('Collapse') : _('Expand') %p - Register and see your runners for this project. + = _("Register and see your runners for this project.") .settings-content = render 'projects/runners/index' @@ -45,7 +45,7 @@ = _('Variables') = link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'variables'), target: '_blank', rel: 'noopener noreferrer' %button.btn.js-settings-toggle{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + = expanded ? _('Collapse') : _('Expand') %p.append-bottom-0 = render "ci/variables/content" .settings-content @@ -54,12 +54,10 @@ %section.settings.no-animate#js-pipeline-triggers{ class: ('expanded' if expanded) } .settings-header %h4 - Pipeline triggers + = _("Pipeline triggers") %button.btn.js-settings-toggle{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + = expanded ? _('Collapse') : _('Expand') %p - Triggers can force a specific branch or tag to get rebuilt with an API call. These tokens will - impersonate their associated user including their access to projects and their project - permissions. + = _("Triggers can force a specific branch or tag to get rebuilt with an API call. These tokens will impersonate their associated user including their access to projects and their project permissions.") .settings-content = render 'projects/triggers/index' -- cgit v1.2.1