status.html.haml 1.98 KB
Newer Older
1 2
- page_title _("GitLab.com import")
- header_title _("Projects"), root_path
Valery Sizov's avatar
Valery Sizov committed
3
%h3.page-title
Douwe Maan's avatar
Douwe Maan committed
4
  %i.fa.fa-heart
5
  = _('Import projects from GitLab.com')
Valery Sizov's avatar
Valery Sizov committed
6

7
%p.light
8
  = _('Select projects you want to import.')
9
%hr
10
%p
11
  = button_tag class: "btn btn-import btn-success js-import-all" do
12
    = _('Import all projects')
Phil Hughes's avatar
Phil Hughes committed
13
    = icon("spinner spin", class: "loading-icon")
14

15
.table-responsive
Douwe Maan's avatar
Douwe Maan committed
16
  %table.table.import-jobs
17 18 19
    %colgroup.import-jobs-from-col
    %colgroup.import-jobs-to-col
    %colgroup.import-jobs-status-col
Douwe Maan's avatar
Douwe Maan committed
20 21
    %thead
      %tr
22 23 24
        %th= _('From GitLab.com')
        %th= _('To this GitLab instance')
        %th= _('Status')
Douwe Maan's avatar
Douwe Maan committed
25 26
    %tbody
      - @already_added_projects.each do |project|
27
        %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" }
Douwe Maan's avatar
Douwe Maan committed
28 29 30
          %td
            = link_to project.import_source, "https://gitlab.com/#{project.import_source}", target: "_blank"
          %td
31
            = link_to project.full_path, [project.namespace.becomes(Namespace), project]
Douwe Maan's avatar
Douwe Maan committed
32 33 34 35
          %td.job-status
            - if project.import_status == 'finished'
              %span
                %i.fa.fa-check
36
                = _('done')
Douwe Maan's avatar
Douwe Maan committed
37 38
            - elsif project.import_status == 'started'
              %i.fa.fa-spinner.fa-spin
39
              = _('started')
Douwe Maan's avatar
Douwe Maan committed
40 41
            - else
              = project.human_import_status_name
42

Douwe Maan's avatar
Douwe Maan committed
43
      - @repos.each do |repo|
44
        %tr{ id: "repo_#{repo["id"]}" }
Douwe Maan's avatar
Douwe Maan committed
45
          %td
46
            = link_to repo["path_with_namespace"], "https://gitlab.com/#{repo["path_with_namespace"]}", target: "_blank", rel: 'noopener noreferrer'
Douwe Maan's avatar
Douwe Maan committed
47
          %td.import-target
48
            = import_project_target(repo['namespace']['path'], repo['name'])
Douwe Maan's avatar
Douwe Maan committed
49
          %td.import-actions.job-status
50
            = button_tag class: "btn btn-import js-add-to-import" do
51
              = _('Import')
Phil Hughes's avatar
Phil Hughes committed
52
              = icon("spinner spin", class: "loading-icon")
53

54
.js-importer-status{ data: { jobs_import_path: "#{jobs_import_gitlab_path}", import_path: "#{import_gitlab_path}" } }