Read about our upcoming Code of Conduct on this issue

_show.html.haml 1.46 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- return unless Feature.enabled?(:project_cleanup, @project)

- expanded = Rails.env.test?

%section.settings.no-animate#cleanup{ class: ('expanded' if expanded) }
  .settings-header
    %h4= _('Repository cleanup')
    %button.btn.js-settings-toggle
      = expanded ? _('Collapse') : _('Expand')
    %p
      = _("Clean up after running %{bfg} on the repository" % { bfg: link_to_bfg }).html_safe
      = link_to icon('question-circle'),
          help_page_path('user/project/repository/reducing_the_repo_size_using_git.md'),
          target: '_blank', rel: 'noopener noreferrer'

  .settings-content
    - url = cleanup_namespace_project_settings_repository_path(@project.namespace, @project)
    = form_for @project, url: url, method: :post, authenticity_token: true, html: { class: 'js-requires-input' } do |f|
      %fieldset.prepend-top-0.append-bottom-10
        .append-bottom-10
          %h5.prepend-top-0
            = _("Upload object map")
          %button.btn.btn-default.js-choose-file{ type: "button" }
            = _("Choose a file")
          %span.prepend-left-default.js-filename
            = _("No file selected")
          = f.file_field :bfg_object_map, accept: 'text/plain', class: "hidden js-object-map-input", required: true
        .form-text.text-muted
          = _("The maximum file size allowed is %{max_attachment_size}mb") % { max_attachment_size: Gitlab::CurrentSettings.max_attachment_size }
      = f.submit _('Start cleanup'), class: 'btn btn-success'