gitlab-org--gitlab-foss/app/views/projects/commit_statuses/_commit_status.html.haml

55 lines
1.5 KiB
Plaintext
Raw Normal View History

2015-10-06 10:01:16 +00:00
%tr.commit_status
%td.status
= ci_status_with_icon(commit_status.status)
%td.commit_status-link
- if commit_status.target_url
= link_to commit_status.target_url do
%strong Build ##{commit_status.id}
- else
%strong Build ##{commit_status.id}
2015-10-14 11:51:29 +00:00
- if commit_status.show_warning?
%i.fa.fa-warning.text-warning
2015-10-12 14:32:58 +00:00
%td
= commit_status.ref
2015-10-06 10:01:16 +00:00
%td
= commit_status.stage
%td
2015-10-12 13:45:46 +00:00
= commit_status.name
2015-10-06 10:01:16 +00:00
.pull-right
- if commit_status.tags.any?
- commit_status.tags.each do |tag|
%span.label.label-primary
= tag
- if commit_status.try(:trigger_request)
%span.label.label-info triggered
- if commit_status.try(:allow_failure)
%span.label.label-danger allowed to fail
%td.duration
- if commit_status.duration
#{duration_in_words(commit_status.finished_at, commit_status.started_at)}
%td.timestamp
- if commit_status.finished_at
%span #{time_ago_in_words commit_status.finished_at} ago
2015-10-12 13:45:46 +00:00
- if defined?(coverage) && coverage
2015-10-06 10:01:16 +00:00
%td.coverage
- if commit_status.try(:coverage)
#{commit_status.coverage}%
%td
2015-10-13 14:51:13 +00:00
.pull-right
- if current_user && can?(current_user, :manage_builds, commit_status.gl_project)
2015-10-12 13:45:46 +00:00
- if commit_status.cancel_url
= link_to commit_status.cancel_url, title: 'Cancel' do
2015-10-06 10:01:16 +00:00
%i.fa.fa-remove.cred
2015-10-13 14:51:13 +00:00
- elsif defined?(allow_retry) && allow_retry && commit_status.retry_url
2015-10-12 13:45:46 +00:00
= link_to commit_status.retry_url, method: :post, title: 'Retry' do
2015-10-06 10:01:16 +00:00
%i.fa.fa-repeat