summaryrefslogtreecommitdiff
path: root/app/views/import
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/import')
-rw-r--r--app/views/import/_githubish_status.html.haml1
-rw-r--r--app/views/import/bulk_imports/status.html.haml13
-rw-r--r--app/views/import/github/status.html.haml4
-rw-r--r--app/views/import/google_code/new.html.haml63
-rw-r--r--app/views/import/google_code/new_user_map.html.haml37
-rw-r--r--app/views/import/google_code/status.html.haml78
-rw-r--r--app/views/import/manifest/_form.html.haml4
7 files changed, 18 insertions, 182 deletions
diff --git a/app/views/import/_githubish_status.html.haml b/app/views/import/_githubish_status.html.haml
index fca73f118b3..4cf08b1d2be 100644
--- a/app/views/import/_githubish_status.html.haml
+++ b/app/views/import/_githubish_status.html.haml
@@ -1,3 +1,4 @@
+- add_page_specific_style 'page_bundles/import'
- provider = local_assigns.fetch(:provider)
- extra_data = local_assigns.fetch(:extra_data, {})
- filterable = local_assigns.fetch(:filterable, true)
diff --git a/app/views/import/bulk_imports/status.html.haml b/app/views/import/bulk_imports/status.html.haml
index d909f6a13f0..6757c32d1e1 100644
--- a/app/views/import/bulk_imports/status.html.haml
+++ b/app/views/import/bulk_imports/status.html.haml
@@ -1 +1,12 @@
-- page_title 'Bulk Import'
+- add_to_breadcrumbs 'New group', admin_users_path
+- add_page_specific_style 'page_bundles/import'
+- breadcrumb_title _('Import groups')
+
+%h1.gl-my-0.gl-py-4.gl-font-size-h1.gl-border-solid.gl-border-gray-200.gl-border-0.gl-border-b-1
+ = s_('BulkImport|Import groups from GitLab')
+%p.gl-my-0.gl-py-5.gl-border-solid.gl-border-gray-200.gl-border-0.gl-border-b-1
+ = s_('BulkImport|Importing groups from %{link}').html_safe % { link: external_link(@source_url, @source_url) }
+
+#import-groups-mount-element{ data: { status_path: status_import_bulk_imports_path(format: :json),
+ available_namespaces_path: import_available_namespaces_path(format: :json),
+ create_bulk_import_path: import_bulk_imports_path(format: :json) } }
diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml
index ba6a5657d12..b62f98f5ded 100644
--- a/app/views/import/github/status.html.haml
+++ b/app/views/import/github/status.html.haml
@@ -7,4 +7,6 @@
= sprite_icon('github', css_class: 'gl-mr-2')
= _('Import repositories from GitHub')
-= render 'import/githubish_status', provider: 'github'
+- paginatable = Feature.enabled?(:remove_legacy_github_client)
+
+= render 'import/githubish_status', provider: 'github', paginatable: paginatable
diff --git a/app/views/import/google_code/new.html.haml b/app/views/import/google_code/new.html.haml
deleted file mode 100644
index 1edd224956c..00000000000
--- a/app/views/import/google_code/new.html.haml
+++ /dev/null
@@ -1,63 +0,0 @@
-- page_title _("Google Code import")
-- header_title _("Projects"), root_path
-%h3.page-title.gl-display-flex
- .gl-display-flex.gl-align-items-center.gl-justify-content-center
- = sprite_icon('google', css_class: 'gl-mr-2')
- = _('Import projects from Google Code')
-%hr
-
-= form_tag callback_import_google_code_path, multipart: true do
- %p
- = _('Follow the steps below to export your Google Code project data.')
- = _("In the next step, you'll be able to select the projects you want to import.")
- %ol
- %li
- %p
- - link_to_google_takeout = link_to(_("Google Takeout"), "https://www.google.com/settings/takeout", target: '_blank', rel: 'noopener noreferrer')
- = _("Go to %{link_to_google_takeout}.").html_safe % { link_to_google_takeout: link_to_google_takeout }
- %li
- %p
- = _("Make sure you're logged into the account that owns the projects you'd like to import.")
- %li
- %p
- = html_escape(_('Click the %{strong_open}Select none%{strong_close} button on the right, since we only need "Google Code Project Hosting".')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
- %li
- %p
- = html_escape(_('Scroll down to %{strong_open}Google Code Project Hosting%{strong_close} and enable the switch on the right.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
- %li
- %p
- = html_escape(_('Choose %{strong_open}Next%{strong_close} at the bottom of the page.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
- %li
- %p
- = _('Leave the "File type" and "Delivery method" options on their default values.')
- %li
- %p
- = html_escape(_('Choose %{strong_open}Create archive%{strong_close} and wait for archiving to complete.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
- %li
- %p
- = html_escape(_('Click the %{strong_open}Download%{strong_close} button and wait for downloading to complete.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
- %li
- %p
- = _('Find the downloaded ZIP file and decompress it.')
- %li
- %p
- = html_escape(_('Find the newly extracted %{code_open}Takeout/Google Code Project Hosting/GoogleCodeProjectHosting.json%{code_close} file.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
- %li
- %p
- = html_escape(_('Upload %{code_open}GoogleCodeProjectHosting.json%{code_close} here:')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
- %p
- %input{ type: "file", name: "dump_file", id: "dump_file" }
- %li
- %p
- = _('Do you want to customize how Google Code email addresses and usernames are imported into GitLab?')
- %p
- = label_tag :create_user_map_0 do
- = radio_button_tag :create_user_map, 0, true
- = _('No, directly import the existing email addresses and usernames.')
- %p
- = label_tag :create_user_map_1 do
- = radio_button_tag :create_user_map, 1, false
- = _('Yes, let me map Google Code users to full names or GitLab users.')
-
- %span
- = submit_tag _('Continue to the next step'), class: "btn btn-success"
diff --git a/app/views/import/google_code/new_user_map.html.haml b/app/views/import/google_code/new_user_map.html.haml
deleted file mode 100644
index 833987dea4e..00000000000
--- a/app/views/import/google_code/new_user_map.html.haml
+++ /dev/null
@@ -1,37 +0,0 @@
-- page_title _("User map"), _("Google Code import")
-- header_title _("Projects"), root_path
-%h3.page-title.gl-display-flex
- .gl-display-flex.gl-align-items-center.gl-justify-content-center
- = sprite_icon('google', css_class: 'gl-mr-2')
- = _('Import projects from Google Code')
-%hr
-
-= form_tag create_user_map_import_google_code_path do
- %p
- = _("Customize how Google Code email addresses and usernames are imported into GitLab. In the next step, you'll be able to select the projects you want to import.")
- %p
- = html_escape(_("The user map is a JSON document mapping the Google Code users that participated on your projects to the way their email addresses and usernames will be imported into GitLab. You can change this by changing the value on the right hand side of %{code_open}:%{code_close}. Be sure to preserve the surrounding double quotes, other punctuation and the email address or username on the left hand side.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
- %ul
- %li
- %strong= _("Default: Directly import the Google Code email address or username")
- %p
- = html_escape(_('%{code_open}"johnsmith@example.com": "johnsm...@example.com"%{code_close} will add "By johnsm...@example.com" to all issues and comments originally created by johnsmith@example.com. The email address or username is masked to ensure the user\'s privacy.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
- %li
- %strong= _("Map a Google Code user to a GitLab user")
- %p
- = html_escape(_('%{code_open}"johnsmith@example.com": "@johnsmith"%{code_close} will add "By %{link_open}@johnsmith%{link_close}" to all issues and comments originally created by johnsmith@example.com, and will set %{link_open}@johnsmith%{link_close} as the assignee on all issues originally assigned to johnsmith@example.com.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe, link_open: '<a href="#">'.html_safe, link_close: '</a>'.html_safe }
- %li
- %strong= _("Map a Google Code user to a full name")
- %p
- = html_escape(_('%{code_open}"johnsmith@example.com": "John Smith"%{code_close} will add "By John Smith" to all issues and comments originally created by johnsmith@example.com.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
- %li
- %strong= _("Map a Google Code user to a full email address")
- %p
- = html_escape(_('%{code_open}"johnsmith@example.com": "johnsmith@example.com"%{code_close} will add "By %{link_open}johnsmith@example.com%{link_close}" to all issues and comments originally created by johnsmith@example.com. By default, the email address or username is masked to ensure the user\'s privacy. Use this option if you want to show the full email address.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe, link_open: '<a href="#">'.html_safe, link_close: '</a>'.html_safe }
-
- .form-group.row
- .col-sm-12
- = text_area_tag :user_map, Gitlab::Json.pretty_generate(@user_map), class: 'form-control', rows: 15
-
- .form-actions
- = submit_tag _('Continue to the next step'), class: "btn btn-success"
diff --git a/app/views/import/google_code/status.html.haml b/app/views/import/google_code/status.html.haml
deleted file mode 100644
index 0004f0de69f..00000000000
--- a/app/views/import/google_code/status.html.haml
+++ /dev/null
@@ -1,78 +0,0 @@
-- page_title _("Google Code import")
-- header_title _("Projects"), root_path
-%h3.page-title.gl-display-flex
- .gl-display-flex.gl-align-items-center.gl-justify-content-center
- = sprite_icon('google', css_class: 'gl-mr-2')
- = _('Import projects from Google Code')
-
-- if @repos.any?
- %p.light
- = _('Select projects you want to import.')
- %p.light
- - link_to_customize = link_to(_("customize"), new_user_map_import_google_code_path)
- = _("Optionally, you can %{link_to_customize} how Google Code email addresses and usernames are imported into GitLab.").html_safe % { link_to_customize: link_to_customize }
- %hr
- %p
- - if @incompatible_repos.any?
- = button_tag class: "btn btn-import btn-success js-import-all" do
- = _("Import all compatible projects")
- = loading_icon(css_class: 'loading-icon')
- - else
- = button_tag class: "btn btn-import btn-success js-import-all" do
- = _("Import all projects")
- = loading_icon(css_class: 'loading-icon')
-
-.table-responsive
- %table.table.import-jobs
- %colgroup.import-jobs-from-col
- %colgroup.import-jobs-to-col
- %colgroup.import-jobs-status-col
- %thead
- %tr
- %th= _("From Google Code")
- %th= _("To GitLab")
- %th= _("Status")
- %tbody
- - @already_added_projects.each do |project|
- %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" }
- %td
- = link_to project.import_source, "https://code.google.com/p/#{project.import_source}", target: "_blank", rel: 'noopener noreferrer'
- %td
- = link_to project.full_path, project
- %td.job-status
- - case project.import_status
- - when 'finished'
- %span
- = sprite_icon('check')
- = _("done")
- - when 'started'
- = loading_icon
- = _("started")
- - else
- = project.human_import_status_name
-
- - @repos.each do |repo|
- %tr{ id: "repo_#{repo.id}" }
- %td
- = link_to repo.name, "https://code.google.com/p/#{repo.name}", target: "_blank", rel: 'noopener noreferrer'
- %td.import-target
- #{current_user.username}/#{repo.name}
- %td.import-actions.job-status
- = button_tag class: "btn btn-import js-add-to-import" do
- = _("Import")
- = loading_icon(css_class: 'loading-icon')
- - @incompatible_repos.each do |repo|
- %tr{ id: "repo_#{repo.id}" }
- %td
- = link_to repo.name, "https://code.google.com/p/#{repo.name}", target: "_blank", rel: 'noopener noreferrer'
- %td.import-target
- %td.import-actions-job-status
- = label_tag _("Incompatible Project"), nil, class: "label badge-danger"
-
-- if @incompatible_repos.any?
- %p
- = _("One or more of your Google Code projects cannot be imported into GitLab directly because they use Subversion or Mercurial for version control, rather than Git.")
- - link_to_import_flow = link_to(_("import flow"), new_import_google_code_path)
- = _("Please convert them to Git on Google Code, and go through the %{link_to_import_flow} again.").html_safe % { link_to_import_flow: link_to_import_flow }
-
-.js-importer-status{ data: { jobs_import_path: "#{jobs_import_google_code_path}", import_path: "#{import_google_code_path}" } }
diff --git a/app/views/import/manifest/_form.html.haml b/app/views/import/manifest/_form.html.haml
index 2ee964974c3..1a3b945cfe5 100644
--- a/app/views/import/manifest/_form.html.haml
+++ b/app/views/import/manifest/_form.html.haml
@@ -19,5 +19,5 @@
= link_to sprite_icon('question-o'), help_page_path('user/project/import/manifest')
.gl-mb-3
- = submit_tag _('List available repositories'), class: 'btn btn-success'
- = link_to _('Cancel'), new_project_path, class: 'btn btn-cancel'
+ = submit_tag _('List available repositories'), class: 'gl-button btn btn-success'
+ = link_to _('Cancel'), new_project_path, class: 'gl-button btn btn-default btn-cancel'