From 429d1abad29d379d8bc8f5219eb72384ad485deb Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 14 Oct 2019 15:06:07 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/views/groups/settings/ci_cd/_form.html.haml | 13 +++++++++++++ app/views/groups/settings/ci_cd/show.html.haml | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 app/views/groups/settings/ci_cd/_form.html.haml (limited to 'app/views/groups') 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 -- cgit v1.2.1