diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-16 23:29:11 -0500 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-16 23:29:11 -0500 |
commit | 5194a9d9f62d5e9702f3a60e42079ce7bf81ddd4 (patch) | |
tree | f68bcc6178383e40faa735f17fcf8b9bdce2d9cf /app | |
parent | bfc6799c9367a0bb249e1d4eeece5485e16ec6a5 (diff) | |
download | gitlab-ce-5194a9d9f62d5e9702f3a60e42079ce7bf81ddd4.tar.gz |
Improve the pipeline box
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/commit/_commit_box.html.haml | 12 | ||||
-rw-r--r-- | app/views/projects/pipelines/_info.html.haml | 37 | ||||
-rw-r--r-- | app/views/projects/pipelines/show.html.haml | 2 |
3 files changed, 39 insertions, 12 deletions
diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 611272b8a74..028564c9305 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -46,17 +46,7 @@ %span.commit-info.branches %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 +- if @commit.status .commit-info-row Builds for = pluralize(@commit.ci_commits.count, 'pipeline') diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml new file mode 100644 index 00000000000..8289aefcde7 --- /dev/null +++ b/app/views/projects/pipelines/_info.html.haml @@ -0,0 +1,37 @@ +%p +.commit-info-row + Pipeline + = link_to "##{@pipeline.id}", namespace_project_pipeline_path(@project.namespace, @project, @pipeline.id), class: "monospace" + with + = pluralize @pipeline.statuses.count(:id), "build" + - if @pipeline.ref + for + = link_to @pipeline.ref, namespace_project_commits_path(@project.namespace, @project, @pipeline.ref), class: "monospace" + - if @pipeline.duration + in + = time_interval_in_words @pipeline.duration + + .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) + = ci_label_for_status(@pipeline.status) + +- if @commit + .commit-info-row + %span.light Authored by + %strong + = commit_author_link(@commit, avatar: true, size: 24) + #{time_ago_with_tooltip(@commit.authored_date)} + +.commit-info-row + %span.light Commit + = link_to @pipeline.sha, namespace_project_commit_path(@project.namespace, @project, @pipeline.sha), class: "monospace" + = clipboard_button(clipboard_text: @pipeline.sha) + +- if @commit + .commit-box.content-block + %h3.commit-title + = markdown escape_once(@commit.title), pipeline: :single_line + - if @commit.description.present? + %pre.commit-description + = preserve(markdown(escape_once(@commit.description), pipeline: :single_line)) diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 8a2e14d8d87..b082d4d5da8 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -3,7 +3,7 @@ = render "header_title" .prepend-top-default - if @commit - = render "projects/commit/commit_box", pipeline: @pipeline + = render "projects/pipelines/info" %div.block-connector = render "projects/commit/ci_commit", ci_commit: @pipeline |