diff options
Diffstat (limited to 'app/views/projects/settings')
8 files changed, 30 insertions, 62 deletions
diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml index 12cb1c3574a..1b0294bc967 100644 --- a/app/views/projects/settings/_archive.html.haml +++ b/app/views/projects/settings/_archive.html.haml @@ -18,5 +18,5 @@ %p= _("Archiving the project will make it entirely read-only. It is hidden from the dashboard and doesn't show up in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: link_start, link_end: '</a>'.html_safe } = link_to _('Archive project'), archive_project_path(@project), aria: { label: _('Archive project') }, - data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link', 'confirm-btn-variant': 'warning' }, - method: :post, class: "gl-button btn btn-warning" + data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link', 'confirm-btn-variant': 'confirm' }, + method: :post, class: "gl-button btn btn-confirm" 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 43d34173af6..7783e83b88f 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -11,22 +11,19 @@ .row .col-lg-12 - = form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings') do |f| + = gitlab_ui_form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings') do |f| = form_errors(@project) %fieldset.builds-feature.js-auto-devops-settings .form-group = f.fields_for :auto_devops_attributes, @auto_devops do |form| .card.auto-devops-card .card-body - .form-check - = form.check_box :enabled, class: 'form-check-input js-toggle-extra-settings', checked: auto_devops_enabled, data: { qa_selector: 'enable_autodevops_checkbox' } - = form.label :enabled, class: 'form-check-label' do - %strong= s_('CICD|Default to Auto DevOps pipeline') - - if auto_devops_enabled - = gl_badge_tag badge_for_auto_devops_scope(@project), { variant: :info }, { class: 'js-instance-default-badge'} - .form-text.text-muted - = s_('CICD|The Auto DevOps pipeline runs if no alternative CI configuration file is found.') - = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer' + - autodevops_help_link = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer' + - auto_devops_badge = auto_devops_enabled ? (gl_badge_tag badge_for_auto_devops_scope(@project), { variant: :info }, { class: 'js-instance-default-badge gl-ml-3 gl-mt-n1'}) : '' + = form.gitlab_ui_checkbox_component :enabled, + (s_('CICD|Default to Auto DevOps pipeline') + auto_devops_badge).html_safe, + checkbox_options: { class: 'js-toggle-extra-settings', checked: auto_devops_enabled, data: { qa_selector: 'enable_autodevops_checkbox' } }, + help_text: (s_('CICD|The Auto DevOps pipeline runs if no alternative CI configuration file is found.') + ' ' + autodevops_help_link).html_safe .card-footer.js-extra-settings{ class: auto_devops_enabled || 'hidden' } - if @project.all_clusters.empty? %p.settings-message.text-center diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 66a1cbb4649..5ef56cda6d2 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -1,35 +1,28 @@ +- help_link_public_pipelines = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'change-which-users-can-view-your-pipelines'), target: '_blank', rel: 'noopener noreferrer' +- help_link_auto_canceling = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'auto-cancel-redundant-pipelines'), target: '_blank', rel: 'noopener noreferrer' +- help_link_skip_outdated =link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'skip-outdated-deployment-jobs'), target: '_blank', rel: 'noopener noreferrer' + .row.gl-mt-3 .col-lg-12 - = form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f| + = gitlab_ui_form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f| = form_errors(@project) %fieldset.builds-feature .form-group - .form-check - = f.check_box :public_builds, { class: 'form-check-input' } - = f.label :public_builds, class: 'form-check-label' do - %strong= _("Public pipelines") - .form-text.text-muted - = _("Allow public access to pipelines and job details, including output logs and artifacts.") - = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'change-which-users-can-view-your-pipelines'), target: '_blank', rel: 'noopener noreferrer' + = f.gitlab_ui_checkbox_component :public_builds, + _("Public pipelines"), + help_text: (_('Allow public access to pipelines and job details, including output logs and artifacts.') + ' ' + help_link_public_pipelines).html_safe .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 pipelines") - .form-text.text-muted - = _("New pipelines cause older pending or running pipelines on the same branch to be cancelled.") - = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'auto-cancel-redundant-pipelines'), target: '_blank', rel: 'noopener noreferrer' + = f.gitlab_ui_checkbox_component :auto_cancel_pending_pipelines, + _("Auto-cancel redundant pipelines"), + checked_value: 'enabled', + unchecked_value: 'disabled', + help_text: (_('New pipelines cause older pending or running pipelines on the same branch to be cancelled.') + ' ' + help_link_auto_canceling).html_safe .form-group - .form-check - = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| - = form.check_box :forward_deployment_enabled, { class: 'form-check-input' } - = form.label :forward_deployment_enabled, class: 'form-check-label' do - %strong= _("Skip outdated deployment jobs") - .form-text.text-muted - = _("When a deployment job is successful, skip older deployment jobs that are still pending.") - = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'skip-outdated-deployment-jobs'), target: '_blank', rel: 'noopener noreferrer' + = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| + = form.gitlab_ui_checkbox_component :forward_deployment_enabled, _("Skip outdated deployment jobs"), + help_text: (_('When a deployment job is successful, skip older deployment jobs that are still pending.') + ' ' + help_link_skip_outdated).html_safe .form-group = f.label :ci_config_path, _('CI/CD configuration file'), class: 'label-bold' diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index f342728feee..28cde994d00 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -1,3 +1,5 @@ += render_if_exists 'shared/minute_limit_banner', namespace: @project + - @content_class = "limit-container-width" unless fluid_layout - page_title _("CI/CD Settings") - page_title _("CI/CD") diff --git a/app/views/projects/settings/operations/_configuration_banner.html.haml b/app/views/projects/settings/operations/_configuration_banner.html.haml deleted file mode 100644 index 9803ffc3c4e..00000000000 --- a/app/views/projects/settings/operations/_configuration_banner.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -%b - = s_('PrometheusService|Prometheus cluster integration') - -- if service.manual_configuration? - .info-well.p-2.mt-2 - = s_('PrometheusService|To use a Prometheus installed on a cluster, deactivate the manual configuration.') -- else - .container-fluid - .row - - if service.prometheus_available? - .col-sm-2 - .svg-container - = image_tag 'illustrations/monitoring/getting_started.svg' - .col-sm-10 - %p.text-success.gl-mt-3 - = s_('PrometheusService|You have a cluster with the Prometheus integration enabled.') - = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'gl-button btn btn-default' - - else - .col-sm-2 - = image_tag 'illustrations/monitoring/loading.svg' - .col-sm-10 - %p.gl-mt-3 - = s_('PrometheusService|Configure GitLab to query a Prometheus installed in one of your clusters.') - = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button btn-confirm' diff --git a/app/views/projects/settings/operations/_prometheus.html.haml b/app/views/projects/settings/operations/_prometheus.html.haml index 1c7bcbbca0b..93281cc225b 100644 --- a/app/views/projects/settings/operations/_prometheus.html.haml +++ b/app/views/projects/settings/operations/_prometheus.html.haml @@ -9,7 +9,7 @@ = link_to _('More information'), help_page_path('user/project/integrations/prometheus'), target: '_blank', rel: 'noopener noreferrer' .settings-content - if @project - = render 'projects/settings/operations/configuration_banner', project: @project, service: service + = render 'shared/prometheus_configuration_banner', project: @project, integration: service, header_tag: :b, info_well_classes: 'gl-p-3 gl-mt-3' %b.gl-mb-3 = s_('PrometheusService|Manual configuration') diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 4e94c96fdde..9a31666c316 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -15,7 +15,7 @@ = s_('Deprecations|Feature deprecation and removal') .gl-alert-body %p - = html_escape(s_('Deprecations|The metrics, logs and tracing features were deprecated in GitLab 14.7, and are %{removal_link_start} scheduled for removal %{link_end} in GitLab 15.0. For information on a possible replacement, %{opstrace_link_start} learn more about Opstrace %{link_end}.')) % {removal_link_start: removal_epic_link_start, opstrace_link_start: opstrace_link_start, link_end: link_end } + = html_escape(s_('Deprecations|The metrics feature was deprecated in GitLab 14.7. The logs and tracing features were also deprecated in GitLab 14.7, and are %{removal_link_start} scheduled for removal %{link_end} in GitLab 15.0. For information on a possible replacement, %{opstrace_link_start} learn more about Opstrace %{link_end}.')) % {removal_link_start: removal_epic_link_start, opstrace_link_start: opstrace_link_start, link_end: link_end } = render 'projects/settings/operations/metrics_dashboard' = render 'projects/settings/operations/tracing' diff --git a/app/views/projects/settings/packages_and_registries/show.html.haml b/app/views/projects/settings/packages_and_registries/show.html.haml index 658b2f2e65c..378bb0f9306 100644 --- a/app/views/projects/settings/packages_and_registries/show.html.haml +++ b/app/views/projects/settings/packages_and_registries/show.html.haml @@ -11,5 +11,5 @@ admin_settings_path: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), enable_historic_entries: container_expiration_policies_historic_entry_enabled?.to_s, help_page_path: help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy'), - show_cleanup_policy_on_alert: show_cleanup_policy_on_alert(@project).to_s, + show_cleanup_policy_link: show_cleanup_policy_link(@project).to_s, tags_regex_help_page_path: help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'regex-pattern-examples') } } |