Skip to content
Snippets Groups Projects
Commit d6d4c2ef authored by Douwe Maan's avatar Douwe Maan
Browse files

Remove duplication between builds/_build and commit_statuses/_commit_status.

parent 64a28d5b
No related branches found
No related tags found
No related merge requests found
%tr.build
%td.status
= ci_status_with_icon(build.status)
%td.commit_status-link
- if build.target_url
= link_to build.target_url do
%strong Build ##{build.id}
- else
%strong Build ##{build.id}
- if build.show_warning?
%i.fa.fa-warning.text-warning
%td
= link_to build.short_sha, namespace_project_commit_path(@project.namespace, @project, build.sha)
%td
= link_to build.ref, namespace_project_commits_path(@project.namespace, @project, build.ref)
%td
- if build.runner
= runner_link(build.runner)
- else
.light none
%td
= build.name
.pull-right
- if build.tags.any?
- build.tags.each do |tag|
%span.label.label-primary
= tag
- if build.trigger_request
%span.label.label-info triggered
- if build.allow_failure
%span.label.label-danger allowed to fail
%td.duration
- if build.duration
#{duration_in_words(build.finished_at, build.started_at)}
%td.timestamp
- if build.finished_at
%span #{time_ago_in_words build.finished_at} ago
%td
.pull-right
- if current_user && can?(current_user, :manage_builds, @project)
- if build.cancel_url
= link_to build.cancel_url, title: 'Cancel' do
%i.fa.fa-remove.cred
Loading
Loading
@@ -46,7 +46,7 @@
%th
 
- @builds.each do |build|
= render 'projects/builds/build', build: build
= render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, allow_retry: true
 
= paginate @builds, theme: 'gitlab'
 
Loading
Loading
@@ -47,7 +47,7 @@
%th
- @ci_commit.refs.each do |ref|
= render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.for_ref(ref).latest.ordered,
locals: { coverage: @ci_project.try(:coverage_enabled?), allow_retry: true }
locals: { coverage: @ci_project.try(:coverage_enabled?), stage: true, allow_retry: true }
 
- if @ci_commit.retried.any?
.gray-content-block.second-block
Loading
Loading
@@ -67,4 +67,4 @@
%th Coverage
%th
= render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.retried,
locals: { coverage: @ci_project.try(:coverage_enabled?) }
locals: { coverage: @ci_project.try(:coverage_enabled?), stage: true }
Loading
Loading
@@ -12,14 +12,27 @@
- if commit_status.show_warning?
%i.fa.fa-warning.text-warning
 
%td
= commit_status.ref
- if defined?(commit_sha) && commit_sha
%td
= link_to build.short_sha, namespace_project_commit_path(@project.namespace, @project, build.sha), class: "monospace"
 
%td
= commit_status.stage
= link_to commit_status.ref, namespace_project_commits_path(@project.namespace, @project, commit_status.ref)
- if defined?(runner) && runner
%td
- if commit_status.try(:runner)
= runner_link(commit_status.runner)
- else
.light none
- if defined?(stage) && stage
%td
= commit_status.stage
 
%td
= commit_status.name
.pull-right
- if commit_status.tags.any?
- commit_status.tags.each do |tag|
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment