summaryrefslogtreecommitdiff
path: root/app/views/admin/application_settings/_repository_storage.html.haml
blob: 12dd881678313f5a664e5a9b60a78f74a2aebf05 (plain)
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
= gitlab_ui_form_for @application_setting, url: repository_admin_application_settings_path(anchor: 'js-repository-storage-settings'), html: { class: 'fieldset-form' } do |f|
  = form_errors(@application_setting)

  %fieldset
    .sub-section
      %h4= _('Hashed repository storage paths')
      .form-group
        - repository_storage_help_link_url = help_page_path('administration/repository_storage_types.md')
        - repository_storage_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: repository_storage_help_link_url }
        = f.gitlab_ui_checkbox_component :hashed_storage_enabled,
           _('Use hashed storage'),
           checkbox_options: { disabled: @application_setting.hashed_storage_enabled? },
           help_text: _('Use hashed storage paths for newly created and renamed repositories. Always enabled since 13.0. %{link_start}Learn more.%{link_end}').html_safe % { link_start: repository_storage_help_link_start, link_end: '</a>'.html_safe }

    .sub-section
      %h4= _("Storage nodes for new repositories")
      .form-group
        .form-text
          %p.text-secondary
            - weights_link_url = help_page_path('administration/repository_storage_paths.md', anchor: 'configure-where-new-repositories-are-stored')
            - weights_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: weights_link_url }
            = html_escape(s_('Enter %{weights_link_start}weights%{weights_link_end} for storages for new repositories. Configured storages appear below.')) % { weights_link_start: weights_link_start, weights_link_end: '</a>'.html_safe }
            = link_to s_('Learn more.'), help_page_path('administration/repository_storage_paths.md'), target: '_blank', rel: 'noopener noreferrer'
        .form-check
          = f.fields_for :repository_storages_weighted, storage_weights do |storage_form|
            - Gitlab.config.repositories.storages.each_key do |storage|
              = storage_form.text_field storage, class: 'form-text-input'
              = storage_form.label storage, storage, class: 'label-bold form-check-label'
              %br
  = f.submit _('Save changes'), pajamas_button: true