debian-mirror-gitlab/app/views/projects/merge_requests/widget/_heading.html.haml

45 lines
1.7 KiB
Text
Raw Normal View History

2015-11-26 14:37:03 +05:30
- ci_commit = @merge_request.ci_commit
2015-10-24 18:46:33 +05:30
- if ci_commit
- status = ci_commit.status
.mr-widget-heading
.ci_widget{class: "ci-#{status}"}
= ci_status_icon(ci_commit)
%span CI build #{status}
for #{@merge_request.last_commit_short_sha}.
%span.ci-coverage
= link_to "View build details", ci_status_path(ci_commit)
- elsif @merge_request.has_ci?
- # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
- # Remove in later versions when services like Jenkins will set CI status via Commit status API
2015-09-11 14:41:01 +05:30
.mr-widget-heading
- [:success, :skipped, :canceled, :failed, :running, :pending].each do |status|
.ci_widget{class: "ci-#{status}", style: "display:none"}
- if status == :success
- status = "passed"
= icon("check-circle")
- else
= icon("circle")
%span CI build #{status}
for #{@merge_request.last_commit_short_sha}.
%span.ci-coverage
2015-09-25 12:07:36 +05:30
- if ci_build_details_path(@merge_request)
= link_to "View build details", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
2015-09-11 14:41:01 +05:30
.ci_widget
= icon("spinner spin")
Checking CI status for #{@merge_request.last_commit_short_sha}…
.ci_widget.ci-not_found{style: "display:none"}
= icon("times-circle")
Could not find CI status for #{@merge_request.last_commit_short_sha}.
.ci_widget.ci-error{style: "display:none"}
= icon("times-circle")
Could not connect to the CI server. Please check your settings and try again.
2015-11-26 14:37:03 +05:30
:javascript
$(function() {
merge_request_widget.getCiStatus();
});