diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-14 15:06:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-14 15:06:07 +0000 |
commit | 429d1abad29d379d8bc8f5219eb72384ad485deb (patch) | |
tree | 5c8f9c96c203dbeb3e3e89f3979ce60453340f3f /app/views | |
parent | e464f195ff5debc3e9aad0f8c4537404b92019c6 (diff) | |
download | gitlab-ce-429d1abad29d379d8bc8f5219eb72384ad485deb.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
5 files changed, 39 insertions, 2 deletions
diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index d1de4286ee7..1f5bce19bc6 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -34,7 +34,7 @@ = f.number_field :max_artifacts_size, class: 'form-control' .form-text.text-muted = _("Set the maximum file size for each job's artifacts") - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size') + = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size-core-only') .form-group = f.label :default_artifacts_expire_in, _('Default artifacts expiration'), class: 'label-bold' = f.text_field :default_artifacts_expire_in, class: 'form-control' diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 1282a032f52..b15afb3b806 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -30,6 +30,6 @@ = f.check_box :lets_encrypt_terms_of_service_accepted, class: 'form-check-input' = f.label :lets_encrypt_terms_of_service_accepted, class: 'form-check-label' do - terms_of_service_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: lets_encrypt_terms_of_service_admin_application_settings_path } - = _("I have read and agree to the Let's Encrypt %{link_start}Terms of Service%{link_end}").html_safe % { link_start: terms_of_service_link_start, link_end: '</a>'.html_safe } + = _("I have read and agree to the Let's Encrypt %{link_start}Terms of Service%{link_end} (PDF)").html_safe % { link_start: terms_of_service_link_start, link_end: '</a>'.html_safe } = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/groups/settings/ci_cd/_form.html.haml b/app/views/groups/settings/ci_cd/_form.html.haml new file mode 100644 index 00000000000..54e88d11827 --- /dev/null +++ b/app/views/groups/settings/ci_cd/_form.html.haml @@ -0,0 +1,13 @@ +.row.prepend-top-default + .col-lg-12 + = form_for group, url: group_settings_ci_cd_path(group, anchor: 'js-general-pipeline-settings') do |f| + = form_errors(group) + %fieldset.builds-feature + .form-group + = f.label :max_artifacts_size, _('Maximum artifacts size (MB)'), class: 'label-bold' + = f.number_field :max_artifacts_size, class: 'form-control' + %p.form-text.text-muted + = _("Set the maximum file size for each job's artifacts") + = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size-core-only'), target: '_blank' + + = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml index d21496ee0aa..a3f35b72cc6 100644 --- a/app/views/groups/settings/ci_cd/show.html.haml +++ b/app/views/groups/settings/ci_cd/show.html.haml @@ -2,6 +2,21 @@ - page_title "CI / CD" - expanded = expanded_by_default? +- general_expanded = @group.errors.empty? ? expanded : true + +-# Given we only have one field in this form which is also admin-only, +-# we don't want to show an empty section to non-admin users, +- if can?(current_user, :update_max_artifacts_size, @group) + %section.settings#js-general-pipeline-settings.no-animate{ class: ('expanded' if general_expanded) } + .settings-header + %h4 + = _("General pipelines") + %button.btn.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + = _("Customize your pipeline configuration.") + .settings-content + = render 'groups/settings/ci_cd/form', group: @group %section.settings#ci-variables.no-animate{ class: ('expanded' if expanded) } .settings-header diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 430d6071468..a674136e791 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -40,6 +40,15 @@ = _('If any job surpasses this timeout threshold, it will be marked as failed. Human readable time input language is accepted like "1 hour". Values without specification represent seconds.') = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'timeout'), target: '_blank' + - if can?(current_user, :update_max_artifacts_size, @project) + %hr + .form-group + = f.label :max_artifacts_size, _('Maximum artifacts size (MB)'), class: 'label-bold' + = f.number_field :max_artifacts_size, class: 'form-control' + %p.form-text.text-muted + = _("Set the maximum file size for each job's artifacts") + = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size-core-only'), target: '_blank' + %hr .form-group = f.label :ci_config_path, _('Custom CI config path'), class: 'label-bold' |