BigW Consortium Gitlab

_heading.html.haml 1.68 KB
Newer Older
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
- if @merge_request.has_ci?
  .mr-widget-heading
    .ci_widget.ci-success{style: "display:none"}
      = icon("check")
      %span CI build passed
      for #{@merge_request.last_commit_short_sha}.
      = link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"

    .ci_widget.ci-failed{style: "display:none"}
      = icon("times")
      %span CI build failed
      for #{@merge_request.last_commit_short_sha}.
      = link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"

    - [:running, :pending].each do |status|
      .ci_widget{class: "ci-#{status}", style: "display:none"}
        = icon("clock-o")
        %span CI build #{status}
        for #{@merge_request.last_commit_short_sha}.
        = 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}

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

32 33 34 35 36 37 38 39 40
    .ci_widget.ci-canceled{style: "display:none"}
      = icon("times")
      %span CI build canceled
      for #{@merge_request.last_commit_short_sha}.
      = link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"

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

  :coffeescript
    $ ->
44
      merge_request_widget.getCiStatus()