Commit 7657d202 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Improve design of commit_box with status of builds and pipelines

parent bf4dc758
- @ci_commits.each do |ci_commit| - @ci_commits.each do |ci_commit|
= render "ci_commit", ci_commit: ci_commit = render "ci_commit", ci_commit: ci_commit, pipeline_details: true
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
- if ci_commit.builds.running_or_pending.any? - if ci_commit.builds.running_or_pending.any?
= link_to "Cancel running", cancel_namespace_project_pipeline_path(@project.namespace, @project, ci_commit.id), data: { confirm: 'Are you sure?' }, class: 'btn btn-grouped btn-danger', method: :post = link_to "Cancel running", cancel_namespace_project_pipeline_path(@project.namespace, @project, ci_commit.id), data: { confirm: 'Are you sure?' }, class: 'btn btn-grouped btn-danger', method: :post
- if defined?(pipeline_details) && pipeline_details
.oneline .oneline
Pipeline Pipeline
= link_to "##{ci_commit.id}", namespace_project_pipeline_path(@project.namespace, @project, ci_commit.id), class: "monospace" = link_to "##{ci_commit.id}", namespace_project_pipeline_path(@project.namespace, @project, ci_commit.id), class: "monospace"
......
...@@ -23,20 +23,6 @@ ...@@ -23,20 +23,6 @@
%p %p
.commit-info-row .commit-info-row
- if defined?(pipeline) && pipeline
.pull-right
= link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline), class: "ci-status ci-#{pipeline.status}" do
= ci_icon_for_status(pipeline.status)
Pipeline:
= ci_label_for_status(pipeline.status)
- elsif @commit.status
.pull-right
= link_to builds_namespace_project_commit_path(@project.namespace, @project, @commit.id), class: "ci-status ci-#{@commit.status}" do
= ci_icon_for_status(@commit.status)
Build:
= ci_label_for_status(@commit.status)
%span.light Authored by %span.light Authored by
%strong %strong
= commit_author_link(@commit, avatar: true, size: 24) = commit_author_link(@commit, avatar: true, size: 24)
...@@ -60,6 +46,27 @@ ...@@ -60,6 +46,27 @@
%span.commit-info.branches %span.commit-info.branches
%i.fa.fa-spinner.fa-spin %i.fa.fa-spinner.fa-spin
- if defined?(pipeline) && pipeline
.commit-info-row
Pipeline
= link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline), class: "ci-status-link ci-status-icon-#{pipeline.status}" do
= ci_icon_for_status(pipeline.status)
= ci_label_for_status(pipeline.status)
- if pipeline.duration
in
= time_interval_in_words 3600
- elsif @commit.status
.commit-info-row
Builds for
= pluralize(@commit.ci_commits.count, 'pipeline')
= link_to builds_namespace_project_commit_path(@project.namespace, @project, @commit.id), class: "ci-status-link ci-status-icon-#{@commit.status}" do
= ci_icon_for_status(@commit.status)
= ci_label_for_status(@commit.status)
- if @commit.ci_commits.duration
in
= time_interval_in_words @commit.ci_commits.duration
.commit-box.content-block .commit-box.content-block
%h3.commit-title %h3.commit-title
= markdown escape_once(@commit.title), pipeline: :single_line = markdown escape_once(@commit.title), pipeline: :single_line
......
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