diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-09 23:39:48 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-09 23:39:48 +0300 |
commit | 1ad0c968d579fe6ac0b2fc00a1dae32449ceb2c3 (patch) | |
tree | d2fdd097dc4f529f723066ba508938b601d81935 /app/views/projects/commit | |
parent | cb90368a692149b4e01b50d7c6682c48cffa438b (diff) | |
download | gitlab-ce-1ad0c968d579fe6ac0b2fc00a1dae32449ceb2c3.tar.gz |
Make a build views nicer
Diffstat (limited to 'app/views/projects/commit')
-rw-r--r-- | app/views/projects/commit/_ci_commit.html.haml | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/app/views/projects/commit/_ci_commit.html.haml b/app/views/projects/commit/_ci_commit.html.haml index 21a30080868..ba0baa1e2a2 100644 --- a/app/views/projects/commit/_ci_commit.html.haml +++ b/app/views/projects/commit/_ci_commit.html.haml @@ -36,17 +36,19 @@ .table-holder %table.table.builds - %thead - %tr - %th Status - %th Build ID - %th Stage - %th Name - %th Duration - %th Finished at - - if @project.build_coverage_enabled? - %th Coverage - %th - builds = ci_commit.statuses.latest.ordered - = render builds, coverage: @project.build_coverage_enabled?, stage: true, ref: false, allow_retry: true - = render ci_commit.retried, coverage: @project.build_coverage_enabled?, stage: true, ref: false, retried: true + - CommitStatus.where(id: builds).stages.each do |stage| + - stage_builds = builds.where(stage: stage) + %tr + %th{colspan: 10} + %strong + - stage_status = CommitStatus.where(id: stage_builds.ids).status + %span{class: "ci-status-link ci-status-icon-#{stage_status}"} + = ci_icon_for_status(stage_status) + + = stage.titleize.pluralize + = render stage_builds, coverage: @project.build_coverage_enabled?, tage: false, ref: false, allow_retry: true + = render ci_commit.retried.select { |build| build.stage == stage }, coverage: @project.build_coverage_enabled?, stage: false, ref: false, retried: true + %tr + %td{colspan: 10} + |