BigW Consortium Gitlab

Commit 3e0651c7 by Mike Greiling

reorder generic commit status columns to match build status partial

parent 086da921
- admin = local_assigns.fetch(:admin, false)
- ref = local_assigns.fetch(:ref, nil) - ref = local_assigns.fetch(:ref, nil)
- commit_sha = local_assigns.fetch(:commit_sha, nil) - commit_sha = local_assigns.fetch(:commit_sha, nil)
- retried = local_assigns.fetch(:retried, false) - retried = local_assigns.fetch(:retried, false)
- pipeline_link = local_assigns.fetch(:pipeline_link, false) - pipeline_link = local_assigns.fetch(:pipeline_link, false)
- stage = local_assigns.fetch(:stage, false) - stage = local_assigns.fetch(:stage, false)
- coverage = local_assigns.fetch(:coverage, false) - coverage = local_assigns.fetch(:coverage, false)
- runner = local_assigns.fetch(:runner, false)
%tr.generic_commit_status %tr.generic_commit_status{class: ('retried' if retried)}
%td.status %td.status
- if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url - if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url
= ci_status_with_icon(generic_commit_status.status, generic_commit_status.target_url) = ci_status_with_icon(generic_commit_status.status, generic_commit_status.target_url)
...@@ -16,13 +16,34 @@ ...@@ -16,13 +16,34 @@
%td.generic_commit_status-link %td.generic_commit_status-link
- if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url - if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url
= link_to generic_commit_status.target_url do = link_to generic_commit_status.target_url do
%strong ##{generic_commit_status.id} %span.build-link ##{generic_commit_status.id}
- else - else
%strong ##{generic_commit_status.id} %span.build-link ##{generic_commit_status.id}
- if ref
- if generic_commit_status.ref
.icon-container
= generic_commit_status.tags.any? ? icon('tag') : icon('code-fork')
= link_to generic_commit_status.ref, namespace_project_commits_path(generic_commit_status.project.namespace, 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, namespace_project_commit_path(generic_commit_status.project.namespace, generic_commit_status.project, generic_commit_status.sha), class: "commit-id monospace"
- if retried - if retried
= icon('warning', class: 'text-warning has-tooltip', title: 'Status was retried.') = icon('warning', class: 'text-warning has-tooltip', title: 'Status was retried.')
.label-container
- if generic_commit_status.tags.any?
- generic_commit_status.tags.each do |tag|
%span.label.label-primary
= tag
- if retried
%span.label.label-warning retried
- if pipeline_link - if pipeline_link
%td %td
= link_to pipeline_path(generic_commit_status.pipeline) do = link_to pipeline_path(generic_commit_status.pipeline) do
...@@ -33,18 +54,12 @@ ...@@ -33,18 +54,12 @@
- else - else
%span.monospace API %span.monospace API
- if commit_sha - if admin
%td
= link_to generic_commit_status.short_sha, namespace_project_commit_path(generic_commit_status.project.namespace, generic_commit_status.project, generic_commit_status.sha), class: "monospace"
- if ref
%td %td
- if generic_commit_status.ref - if generic_commit_status.project
= link_to generic_commit_status.ref, namespace_project_commits_path(generic_commit_status.project.namespace, generic_commit_status.project, generic_commit_status.ref) = link_to generic_commit_status.project.name_with_namespace, admin_namespace_project_path(generic_commit_status.project.namespace, generic_commit_status.project)
- else
.light none
- if runner - if admin
%td %td
- if generic_commit_status.try(:runner) - if generic_commit_status.try(:runner)
= runner_link(generic_commit_status.runner) = runner_link(generic_commit_status.runner)
...@@ -58,14 +73,6 @@ ...@@ -58,14 +73,6 @@
%td %td
= generic_commit_status.name = generic_commit_status.name
%td
- if generic_commit_status.tags.any?
- generic_commit_status.tags.each do |tag|
%span.label.label-primary
= tag
- if retried
%span.label.label-warning retried
%td.duration %td.duration
- if generic_commit_status.duration - if generic_commit_status.duration
= icon("clock-o") = icon("clock-o")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment