summaryrefslogtreecommitdiff
path: root/app/views/groups/_import_group_from_another_instance_panel.html.haml
blob: 5b9cd80799c158245cd218ccc589b10e8a943924 (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
31
32
33
34
35
= form_with url: configure_import_bulk_imports_path, class: 'group-form gl-show-field-errors' do |f|
  .gl-border-l-solid.gl-border-r-solid.gl-border-gray-100.gl-border-1.gl-p-5
    .gl-display-flex.gl-align-items-center
      %h4.gl-display-flex
        = s_('GroupsNew|Import groups from another instance of GitLab')
      = link_to _('History'), history_import_bulk_imports_path, class: 'gl-link gl-ml-auto'
    .gl-alert.gl-alert-warning{ role: 'alert' }
      = sprite_icon('warning', css_class: 'gl-icon s16 gl-alert-icon gl-alert-icon-no-title')
      .gl-alert-body
        - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') }
        - docs_link_end = '</a>'.html_safe
        = s_('GroupsNew|Not all related objects are migrated. %{docs_link_start}More info%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: docs_link_end }
    %p.gl-mt-3
      = s_('GroupsNew|Provide credentials for another instance of GitLab to import your groups directly.')
    .form-group.gl-display-flex.gl-flex-direction-column
      = f.label :bulk_import_gitlab_url, s_('GroupsNew|GitLab source URL'), for: 'import_gitlab_url'
      = f.text_field :bulk_import_gitlab_url, placeholder: 'https://gitlab.example.com', class: 'gl-form-input col-xs-12 col-sm-8',
        required: true,
        title: s_('GroupsNew|Please fill in GitLab source URL.'),
        id: 'import_gitlab_url',
        data: { qa_selector: 'import_gitlab_url' }
    .form-group.gl-display-flex.gl-flex-direction-column
      = f.label :bulk_import_gitlab_access_token, s_('GroupsNew|Personal access token'), for: 'import_gitlab_token'
      .gl-font-weight-normal
        - pat_link_start = '<a href="%{url}" target="_blank">'.html_safe % { url: help_page_path('user/profile/personal_access_tokens') }
        - short_living_link_start = '<a href="%{url}" target="_blank">'.html_safe % { url: help_page_path('security/token_overview', anchor: 'security-considerations') }
        = s_('GroupsNew|Create this in the %{pat_link_start}user settings%{pat_link_end} of the source GitLab instance. For %{short_living_link_start}security reasons%{short_living_link_end}, use a short expiration date when creating the token.').html_safe % { pat_link_start: pat_link_start, pat_link_end: '</a>'.html_safe, short_living_link_start: short_living_link_start, short_living_link_end: '</a>'.html_safe }
      = f.text_field :bulk_import_gitlab_access_token, placeholder: s_('GroupsNew|e.g. h8d3f016698e...'), class: 'gl-form-input gl-mt-3 col-xs-12 col-sm-8',
        required: true,
        autocomplete: 'off',
        title: s_('GroupsNew|Please fill in your personal access token.'),
        id: 'import_gitlab_token',
        data: { qa_selector: 'import_gitlab_token' }
  .gl-border-gray-100.gl-border-solid.gl-border-1.gl-bg-gray-10.gl-p-5
    = f.submit s_('GroupsNew|Connect instance'), class: 'btn gl-button btn-confirm', data: { qa_selector: 'connect_instance_button' }