88 lines
2.9 KiB
Plaintext
88 lines
2.9 KiB
Plaintext
- admin = local_assigns.fetch(:admin, false)
|
|
- ref = local_assigns.fetch(:ref, nil)
|
|
- commit_sha = local_assigns.fetch(:commit_sha, nil)
|
|
- retried = local_assigns.fetch(:retried, false)
|
|
- pipeline_link = local_assigns.fetch(:pipeline_link, false)
|
|
- stage = local_assigns.fetch(:stage, false)
|
|
|
|
%tr.generic-commit-status{ class: ('retried' if retried) }
|
|
%td.status
|
|
= render 'ci/status/badge', status: generic_commit_status.detailed_status(current_user)
|
|
|
|
%td
|
|
= generic_commit_status.name
|
|
|
|
%td.generic-commit-status-link
|
|
- if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url
|
|
= link_to generic_commit_status.target_url do
|
|
%span.build-link ##{generic_commit_status.id}
|
|
- else
|
|
%span.build-link ##{generic_commit_status.id}
|
|
|
|
- if ref
|
|
- if generic_commit_status.ref
|
|
.icon-container
|
|
= generic_commit_status.tags.any? ? sprite_icon('tag', size: 10) : sprite_icon('fork', size: 10)
|
|
= link_to generic_commit_status.ref, project_commits_path(generic_commit_status.project, generic_commit_status.ref)
|
|
- else
|
|
.light none
|
|
.icon-container.commit-icon
|
|
= custom_icon("icon_commit")
|
|
|
|
- if commit_sha
|
|
= link_to generic_commit_status.short_sha, project_commit_path(generic_commit_status.project, generic_commit_status.sha), class: "commit-sha"
|
|
|
|
- if retried
|
|
%span.has-tooltip{ title: _('Status was retried.') }
|
|
= sprite_icon('warning-solid', css_class: 'text-warning')
|
|
|
|
.label-container
|
|
- if generic_commit_status.tags.any?
|
|
- generic_commit_status.tags.each do |tag|
|
|
%span.badge.badge-primary
|
|
= tag
|
|
- if retried
|
|
%span.badge.badge-warning retried
|
|
|
|
- if pipeline_link
|
|
%td
|
|
= link_to pipeline_path(generic_commit_status.pipeline) do
|
|
%span.pipeline-id ##{generic_commit_status.pipeline.id}
|
|
%span by
|
|
- if generic_commit_status.pipeline.user
|
|
= user_avatar(user: generic_commit_status.pipeline.user, size: 20)
|
|
- else
|
|
%span.monospace API
|
|
|
|
- if admin
|
|
%td
|
|
- if generic_commit_status.project
|
|
= link_to generic_commit_status.project.full_name, admin_project_path(generic_commit_status.project)
|
|
%td
|
|
- if generic_commit_status.try(:runner)
|
|
= runner_link(generic_commit_status.runner)
|
|
- else
|
|
.light none
|
|
|
|
- if stage
|
|
%td
|
|
= generic_commit_status.stage
|
|
|
|
%td
|
|
- if generic_commit_status.duration
|
|
%p.duration
|
|
= custom_icon("icon_timer")
|
|
= duration_in_numbers(generic_commit_status.duration)
|
|
|
|
- if generic_commit_status.finished_at
|
|
%p.finished-at
|
|
= sprite_icon("calendar")
|
|
%span= time_ago_with_tooltip(generic_commit_status.finished_at)
|
|
|
|
%td.coverage
|
|
- if generic_commit_status.try(:coverage)
|
|
#{generic_commit_status.coverage}%
|
|
|
|
%td
|
|
-# empty column to match number of columns in ci/builds/_build.html.haml
|