status.html.haml 1.36 KB
Newer Older
Valery Sizov's avatar
Valery Sizov committed
1
%h3.page-title
2
  %i.fa.fa-github
Douwe Maan's avatar
Douwe Maan committed
3
  Import repositories from GitHub
Valery Sizov's avatar
Valery Sizov committed
4

5
%p.light
6
  Select projects you want to import.
7
%hr
8 9 10
%p
  = button_tag 'Import all projects', class: "btn btn-success js-import-all"

11
%table.table.import-jobs
Valery Sizov's avatar
Valery Sizov committed
12 13 14 15 16 17
  %thead
    %tr
      %th From GitHub
      %th To GitLab
      %th Status
  %tbody
18
    - @already_added_projects.each do |project|
19
      %tr{id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}"}
20 21
        %td
          = link_to project.import_source, "https://github.com/#{project.import_source}", target: "_blank"
22
        %td
23
          %strong= link_to project.path_with_namespace, project
24
        %td.job-status
25 26 27 28
          - if project.import_status == 'finished'
            %span.cgreen
              %i.fa.fa-check
              done
29 30 31
          - elsif project.import_status == 'started'
            %i.fa.fa-spinner.fa-spin
            started
32 33 34
          - else
            = project.human_import_status_name

Valery Sizov's avatar
Valery Sizov committed
35 36
    - @repos.each do |repo|
      %tr{id: "repo_#{repo.id}"}
37 38
        %td
          = link_to repo.full_name, "https://github.com/#{repo.full_name}", target: "_blank"
39
        %td.import-target
Valery Sizov's avatar
Valery Sizov committed
40
          = repo.full_name
41
        %td.import-actions.job-status
42
          = button_tag "Import", class: "btn js-add-to-import"
43

Valery Sizov's avatar
Valery Sizov committed
44
:coffeescript
45 46
  $ ->
    new ImporterStatus("#{jobs_import_github_path}", "#{import_github_path}")