summaryrefslogtreecommitdiff
path: root/app/views/projects/merge_requests/widget/_heading.html.haml
blob: 17d529766e6e44fb90eb75822fce4640c902a171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
- if @merge_request.has_ci?
  .mr-widget-heading
    - [:success, :skipped, :canceled, :failed, :running, :pending].each do |status|
      .ci_widget{class: "ci-#{status}", style: "display:none"}
        - if status == :success
          = icon("check-circle")
        - else
          = icon("circle")
        %span CI build #{status}
        for #{@merge_request.last_commit_short_sha}.
        %span.ci-coverage
        = link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"

    .ci_widget
      = icon("spinner spin")
      Checking for CI status for #{@merge_request.last_commit_short_sha}

    .ci_widget.ci-not_found{style: "display:none"}
      = icon("times-circle")
      %span Can not find commit in the CI server
      for #{@merge_request.last_commit_short_sha}.

    .ci_widget.ci-error{style: "display:none"}
      = icon("times-circle")
      %span Cannot connect to the CI server. Please check your settings and try again.

  :coffeescript
    $ ->
      merge_request_widget.getCiStatus()