BigW Consortium Gitlab

status.html.haml 1.44 KB
Newer Older
Valery Sizov committed
1
%h3.page-title
Douwe Maan committed
2
  %i.fa.fa-heart
3
  Import projects from GitLab.com
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 committed
12 13
  %thead
    %tr
14
      %th From GitLab.com
15
      %th To this GitLab instance
Valery Sizov committed
16 17
      %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://gitlab.com/#{project.import_source}", target: "_blank"
22
        %td
23
          %strong= link_to project.path_with_namespace, [project.namespace.becomes(Namespace), project]
24
        %td.job-status
25
          - if project.import_status == 'finished'
26
            %span
27 28
              %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 committed
35
    - @repos.each do |repo|
36
      %tr{id: "repo_#{repo["id"]}"}
37 38
        %td
          = link_to repo["path_with_namespace"], "https://gitlab.com/#{repo["path_with_namespace"]}", target: "_blank"
39
        %td.import-target
40
          = repo["path_with_namespace"]
41
        %td.import-actions.job-status
42
          = button_tag "Import", class: "btn js-add-to-import"
43

Valery Sizov committed
44
:coffeescript
45
  new ImporterStatus("#{jobs_import_gitlab_path}", "#{import_gitlab_path}")