BigW Consortium Gitlab

status.html.haml 2.99 KB
Newer Older
1
- page_title "Google Code import"
2
- header_title "Projects", root_path
3 4 5 6
%h3.page-title
  %i.fa.fa-google
  Import projects from Google Code

7 8 9 10 11 12 13 14 15 16
- if @repos.any?
  %p.light
    Select projects you want to import.
  %p.light
    Optionally, you can
    = link_to "customize", new_user_map_import_google_code_path
    how Google Code email addresses and usernames are imported into GitLab.
  %hr
  %p
  - if @incompatible_repos.any?
17 18
    = button_tag class: "btn btn-import btn-success js-import-all" do
      Import all compatible projects
19
      = icon("spinner spin", class: "loading-icon")
20
  - else
21 22
    = button_tag class: "btn btn-import btn-success js-import-all" do
      Import all projects
23
      = icon("spinner spin", class: "loading-icon")
24

25
.table-responsive
Douwe Maan committed
26
  %table.table.import-jobs
27 28 29
    %colgroup.import-jobs-from-col
    %colgroup.import-jobs-to-col
    %colgroup.import-jobs-status-col
Douwe Maan committed
30 31 32 33 34 35 36
    %thead
      %tr
        %th From Google Code
        %th To GitLab
        %th Status
    %tbody
      - @already_added_projects.each do |project|
37
        %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" }
Douwe Maan committed
38
          %td
39
            = link_to project.import_source, "https://code.google.com/p/#{project.import_source}", target: "_blank", rel: 'noopener noreferrer'
Douwe Maan committed
40
          %td
41
            = link_to project.path_with_namespace, [project.namespace.becomes(Namespace), project]
Douwe Maan committed
42 43 44 45 46 47 48 49 50 51
          %td.job-status
            - if project.import_status == 'finished'
              %span
                %i.fa.fa-check
                done
            - elsif project.import_status == 'started'
              %i.fa.fa-spinner.fa-spin
              started
            - else
              = project.human_import_status_name
52

Douwe Maan committed
53
      - @repos.each do |repo|
54
        %tr{ id: "repo_#{repo.id}" }
Douwe Maan committed
55
          %td
56
            = link_to repo.name, "https://code.google.com/p/#{repo.name}", target: "_blank", rel: 'noopener noreferrer'
Douwe Maan committed
57
          %td.import-target
58
            #{current_user.username}/#{repo.name}
Douwe Maan committed
59
          %td.import-actions.job-status
60 61
            = button_tag class: "btn btn-import js-add-to-import" do
              Import
62
              = icon("spinner spin", class: "loading-icon")
Douwe Maan committed
63
      - @incompatible_repos.each do |repo|
64
        %tr{ id: "repo_#{repo.id}" }
Douwe Maan committed
65
          %td
66
            = link_to repo.name, "https://code.google.com/p/#{repo.name}", target: "_blank", rel: 'noopener noreferrer'
Douwe Maan committed
67 68 69
          %td.import-target
          %td.import-actions-job-status
            = label_tag "Incompatible Project", nil, class: "label label-danger"
70 71 72 73 74 75 76 77 78

- 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. Please convert them to Git on Google Code, and go
    through the
    = link_to "import flow", new_import_google_code_path
    again.
79

80
.js-importer-status{ data: { jobs_import_path: "#{jobs_import_google_code_path}", import_path: "#{import_google_code_path}" } }