diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /app/views/projects/settings | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'app/views/projects/settings')
-rw-r--r-- | app/views/projects/settings/_archive.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/settings/access_tokens/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/settings/branch_rules/index.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 24 | ||||
-rw-r--r-- | app/views/projects/settings/ci_cd/_form.html.haml | 26 | ||||
-rw-r--r-- | app/views/projects/settings/ci_cd/show.html.haml | 16 | ||||
-rw-r--r-- | app/views/projects/settings/integrations/_form.html.haml | 22 | ||||
-rw-r--r-- | app/views/projects/settings/integrations/edit.html.haml | 9 | ||||
-rw-r--r-- | app/views/projects/settings/integrations/index.html.haml (renamed from app/views/projects/settings/integrations/show.html.haml) | 0 | ||||
-rw-r--r-- | app/views/projects/settings/operations/_alert_management.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/settings/operations/_error_tracking.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/settings/operations/_tracing.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/settings/repository/show.html.haml | 2 |
13 files changed, 69 insertions, 48 deletions
diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml index 1b0294bc967..8a080241513 100644 --- a/app/views/projects/settings/_archive.html.haml +++ b/app/views/projects/settings/_archive.html.haml @@ -8,14 +8,14 @@ = _('Archive project') - if @project.archived? - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'unarchiving-a-project') } - %p= _("Unarchiving the project will restore its members' ability to make changes to it. The repository can be committed to, and issues, comments, and other entities can be created. %{strong_start}Once active, this project shows up in the search and on the dashboard.%{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 } + %p= _("Unarchiving the project restores its members' ability to make commits, and create issues, comments, and other entities. %{strong_start}After you unarchive the project, it displays in the search and on the dashboard.%{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 _('Unarchive project'), unarchive_project_path(@project), aria: { label: _('Unarchive project') }, data: { confirm: _("Are you sure that you want to unarchive this project?"), qa_selector: 'unarchive_project_link' }, method: :post, class: "gl-button btn btn-confirm" - else - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'archiving-a-project') } - %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 } + %p= _("Archiving the project makes it entirely read-only. It is hidden from the dashboard and doesn't display 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': 'confirm' }, diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml index e4b027fcc44..359e34d8918 100644 --- a/app/views/projects/settings/access_tokens/index.html.haml +++ b/app/views/projects/settings/access_tokens/index.html.haml @@ -36,7 +36,7 @@ resource: @project, token: @resource_access_token, scopes: @scopes, - access_levels: ProjectMember.access_level_roles, + access_levels: ProjectMember.permissible_access_level_roles(current_user, @project), default_access_level: Gitlab::Access::MAINTAINER, prefix: :resource_access_token, help_path: help_page_path('user/project/settings/project_access_tokens', anchor: 'scopes-for-a-project-access-token') diff --git a/app/views/projects/settings/branch_rules/index.html.haml b/app/views/projects/settings/branch_rules/index.html.haml new file mode 100644 index 00000000000..384d504e51f --- /dev/null +++ b/app/views/projects/settings/branch_rules/index.html.haml @@ -0,0 +1,6 @@ +- add_to_breadcrumbs _('Repository Settings'), project_settings_repository_path(@project) +- page_title _('Branch rules') + +%h3= _('Branch rules') + +#js-branch-rules{ data: { project_path: @project.full_path } } 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 7783e83b88f..96564e44cf2 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -9,6 +9,10 @@ - base_domain_path = help_page_path('user/project/clusters/gitlab_managed_clusters', anchor: 'base-domain') - base_domain_link_start = link_start % { url: base_domain_path } +- help_link_continouos = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-deploy'), target: '_blank', rel: 'noopener noreferrer' +- help_link_timed = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/customize.md', anchor: 'timed-incremental-rollout-to-production'), target: '_blank', rel: 'noopener noreferrer' +- help_link_incremental = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/customize.md', anchor: 'incremental-rollout-to-production'), target: '_blank', rel: 'noopener noreferrer' + .row .col-lg-12 = gitlab_ui_form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings') do |f| @@ -33,22 +37,8 @@ = s_('CICD|Add a %{base_domain_link_start}base domain%{link_end} to your %{kubernetes_cluster_link_start}Kubernetes cluster%{link_end} for your deployment strategy to work.').html_safe % { base_domain_link_start: base_domain_link_start, kubernetes_cluster_link_start: kubernetes_cluster_link_start, link_end: link_end } %label.gl-mt-3 %strong= s_('CICD|Deployment strategy') - .form-check - = form.radio_button :deploy_strategy, 'continuous', class: 'form-check-input' - = form.label :deploy_strategy_continuous, class: 'form-check-label' do - = s_('CICD|Continuous deployment to production') - = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-deploy'), target: '_blank', rel: 'noopener noreferrer' - - .form-check - = form.radio_button :deploy_strategy, 'timed_incremental', class: 'form-check-input' - = form.label :deploy_strategy_timed_incremental, class: 'form-check-label' do - = s_('CICD|Continuous deployment to production using timed incremental rollout') - = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/customize.md', anchor: 'timed-incremental-rollout-to-production'), target: '_blank', rel: 'noopener noreferrer' - - .form-check - = form.radio_button :deploy_strategy, 'manual', class: 'form-check-input' - = form.label :deploy_strategy_manual, class: 'form-check-label' do - = s_('CICD|Automatic deployment to staging, manual deployment to production') - = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/customize.md', anchor: 'incremental-rollout-to-production'), target: '_blank', rel: 'noopener noreferrer' + = form.gitlab_ui_radio_component :deploy_strategy, 'continuous', (s_('CICD|Continuous deployment to production') + ' ' + help_link_continouos).html_safe + = form.gitlab_ui_radio_component :deploy_strategy, 'timed_incremental', (s_('CICD|Continuous deployment to production using timed incremental rollout') + ' ' + help_link_timed).html_safe + = form.gitlab_ui_radio_component :deploy_strategy, 'manual', (s_('CICD|Automatic deployment to staging, manual deployment to production') + ' ' + help_link_incremental).html_safe = f.submit _('Save changes'), class: "btn gl-button btn-confirm gl-mt-5", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 508e63f77d8..9419dacc16f 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -39,25 +39,19 @@ %hr .form-group - %h5.gl-mt-0 + %h5.gl-mt-0.gl-mb-3 = _("Git strategy") - %p + .gl-mb-3 = _("Choose which Git strategy to use when fetching the project.") = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'choose-the-default-git-strategy'), target: '_blank', rel: 'noopener noreferrer' - .form-check - = f.radio_button :build_allow_git_fetch, 'false', { class: 'form-check-input' } - = f.label :build_allow_git_fetch_false, class: 'form-check-label' do - %strong git clone - %br - %span - = _("For each job, clone the repository.") - .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 - = html_escape(_("For each job, re-use the project workspace. If the workspace doesn't exist, use %{code_open}git clone%{code_close}.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } + = f.gitlab_ui_radio_component :build_allow_git_fetch, + false, + "git clone", + help_text: _("For each job, clone the repository.") + = f.gitlab_ui_radio_component :build_allow_git_fetch, + true, + "git fetch", + help_text: html_escape(_("For each job, re-use the project workspace. If the workspace doesn't exist, use %{code_open}git clone%{code_close}.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } .form-group = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 87ca13a7bd6..5da3d2b891c 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -1,5 +1,3 @@ -= 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") @@ -11,7 +9,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("General pipelines") - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _("Customize your pipeline configuration.") @@ -22,7 +20,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = s_('CICD|Auto DevOps') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p - auto_devops_url = help_page_path('topics/autodevops/index') @@ -39,7 +37,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Runners") - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _("Runners are processes that pick up and execute CI/CD jobs for GitLab.") @@ -52,7 +50,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Artifacts") - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _("A job artifact is an archive of files and directories saved by a job when it finishes.") @@ -69,7 +67,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Pipeline triggers") - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _("Trigger a pipeline for a branch or tag by generating a trigger token and using it with an API call. The token impersonates a user's project access and permissions.") @@ -84,7 +82,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Deploy freezes") - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p - freeze_period_docs = help_page_path('user/project/releases/index', anchor: 'prevent-unintentional-releases-by-setting-a-deploy-freeze') @@ -102,7 +100,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Token Access") - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _("Control which projects can be accessed by API requests authenticated with this project's CI_JOB_TOKEN CI/CD variable. It is a security risk to disable this feature, because unauthorized projects might attempt to retrieve an active token and access the API.") diff --git a/app/views/projects/settings/integrations/_form.html.haml b/app/views/projects/settings/integrations/_form.html.haml new file mode 100644 index 00000000000..9d74f99bb19 --- /dev/null +++ b/app/views/projects/settings/integrations/_form.html.haml @@ -0,0 +1,22 @@ +- if lookup_context.template_exists?('top', "shared/integrations/#{integration.to_param}", true) + = render "shared/integrations/#{integration.to_param}/top", integration: integration + +- if integration.activate_disabled_reason.present? && integration.activate_disabled_reason[:trackers].any? + -# When using integration.activate_disabled_reason[:trackers], it's potentially insecure to use the raw records + -# when passed directly to the frontend. Only use specific fields that are needed for render. + -# For example, we can get the link to each tracker with scoped_edit_integration_path(tracker, tracker.project) + = render Pajamas::AlertComponent.new(title: s_('ExternalIssueIntegration|Another issue tracker is already in use'), + variant: :warning, + dismissible: false) do |c| + = c.body do + = s_('ExternalIssueIntegration|Only one issue tracker integration can be active at a time. Please disable the active tracker first and try again.') + +%h2.gl-mb-4 + = integration.title + - if integration.operating? + = sprite_icon('check', css_class: 'gl-text-green-500') + += render 'shared/integration_settings', integration: integration +- if lookup_context.template_exists?('show', "shared/integrations/#{integration.to_param}", true) + %hr + = render "shared/integrations/#{integration.to_param}/show", integration: integration diff --git a/app/views/projects/settings/integrations/edit.html.haml b/app/views/projects/settings/integrations/edit.html.haml new file mode 100644 index 00000000000..a250daafdbb --- /dev/null +++ b/app/views/projects/settings/integrations/edit.html.haml @@ -0,0 +1,9 @@ +- breadcrumb_title @integration.title +- add_to_breadcrumbs _('Integration Settings'), project_settings_integrations_path(@project) +- page_title @integration.title, _('Integrations') +- @content_class = 'limit-container-width' unless fluid_layout + += render 'form', integration: @integration + +- if @web_hook_logs + = render partial: 'projects/hook_logs/index', locals: { hook: @integration.service_hook, hook_logs: @web_hook_logs, project: @project } diff --git a/app/views/projects/settings/integrations/show.html.haml b/app/views/projects/settings/integrations/index.html.haml index 84635941436..84635941436 100644 --- a/app/views/projects/settings/integrations/show.html.haml +++ b/app/views/projects/settings/integrations/index.html.haml diff --git a/app/views/projects/settings/operations/_alert_management.html.haml b/app/views/projects/settings/operations/_alert_management.html.haml index 34255af9cc6..d80f1e4597c 100644 --- a/app/views/projects/settings/operations/_alert_management.html.haml +++ b/app/views/projects/settings/operations/_alert_management.html.haml @@ -7,7 +7,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Alerts') - %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = _('Expand') %p = _('Display alerts from all configured monitoring tools.') diff --git a/app/views/projects/settings/operations/_error_tracking.html.haml b/app/views/projects/settings/operations/_error_tracking.html.haml index 23b1ec4dea3..5d89790ef9f 100644 --- a/app/views/projects/settings/operations/_error_tracking.html.haml +++ b/app/views/projects/settings/operations/_error_tracking.html.haml @@ -6,7 +6,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Error tracking') - %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = _('Expand') %p = _('Link Sentry to GitLab to discover and view the errors your application generates.') diff --git a/app/views/projects/settings/operations/_tracing.html.haml b/app/views/projects/settings/operations/_tracing.html.haml index 343fd22c051..3c8ebe3fb20 100644 --- a/app/views/projects/settings/operations/_tracing.html.haml +++ b/app/views/projects/settings/operations/_tracing.html.haml @@ -4,7 +4,7 @@ .settings-header{ :class => 'border-top' } %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Tracing') - %button.btn.btn-default.gl-button.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = _('Expand') %p = _('Embed an image of your existing Jaeger server in GitLab.') diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml index 24fc137fd29..500cfdcb62b 100644 --- a/app/views/projects/settings/repository/show.html.haml +++ b/app/views/projects/settings/repository/show.html.haml @@ -4,6 +4,8 @@ - deploy_token_description = s_('DeployTokens|Deploy tokens allow access to packages, your repository, and registry images.') = render "projects/default_branch/show" +- if Feature.enabled?(:branch_rules, @project) + = render "projects/branch_rules/show" = render_if_exists "projects/push_rules/index" = render "projects/mirrors/mirror_repos" |