From e86668984f4f7465ed39ffcf9ce09aabfa8f79da Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 18 Sep 2015 09:44:10 +0200 Subject: Style CI project/build list Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/ci/projects.scss | 27 +------------------------- app/helpers/ci/builds_helper.rb | 10 +++++----- app/helpers/ci/commits_helper.rb | 12 ++++++------ app/views/ci/admin/builds/_build.html.haml | 2 +- app/views/ci/admin/projects/_project.html.haml | 2 +- app/views/ci/admin/runners/show.html.haml | 2 +- app/views/ci/builds/_build.html.haml | 2 +- app/views/ci/builds/show.html.haml | 4 ++-- app/views/ci/commits/_commit.html.haml | 2 +- app/views/ci/commits/show.html.haml | 2 +- app/views/ci/projects/_project.html.haml | 2 +- 11 files changed, 21 insertions(+), 46 deletions(-) diff --git a/app/assets/stylesheets/ci/projects.scss b/app/assets/stylesheets/ci/projects.scss index e5d69360c2c..3b8a29269ad 100644 --- a/app/assets/stylesheets/ci/projects.scss +++ b/app/assets/stylesheets/ci/projects.scss @@ -13,31 +13,6 @@ .builds, .projects-table { - .alert-success { - background-color: #6fc995; - border-color: #5bba83; - } - - .alert-danger { - background-color: #eb897f; - border-color: #d4776e; - } - - .alert-info { - background-color: #3498db; - border-color: #2e8ece; - } - - .alert-warning { - background-color: #EB974E; - border-color: #E87E04; - } - - .alert-disabled { - background: $background-color; - border-color: $border-color; - } - .light { border-color: $border-color; } @@ -47,8 +22,8 @@ } td { + color: $gl-gray; vertical-align: middle !important; - border-color: inherit !important; a { font-weight: normal; diff --git a/app/helpers/ci/builds_helper.rb b/app/helpers/ci/builds_helper.rb index cdabdad17d2..422994f5984 100644 --- a/app/helpers/ci/builds_helper.rb +++ b/app/helpers/ci/builds_helper.rb @@ -16,15 +16,15 @@ module Ci ci_project_build_url(build.project, build) end - def build_status_alert_class(build) + def build_status_css_class(build) if build.success? - 'alert-success' + 'build-success' elsif build.failed? - 'alert-danger' + 'build-danger' elsif build.canceled? - 'alert-disabled' + 'build-disabled' else - 'alert-warning' + 'build-warning' end end diff --git a/app/helpers/ci/commits_helper.rb b/app/helpers/ci/commits_helper.rb index 74de30e006e..2c86bbffa36 100644 --- a/app/helpers/ci/commits_helper.rb +++ b/app/helpers/ci/commits_helper.rb @@ -1,17 +1,17 @@ module Ci module CommitsHelper - def commit_status_alert_class(commit) - return 'alert-info' unless commit + def commit_status_css_class(commit) + return 'build-info' unless commit case commit.status when 'success' - 'alert-success' + 'build-success' when 'failed', 'canceled' - 'alert-danger' + 'build-danger' when 'skipped' - 'alert-disabled' + 'build-disabled' else - 'alert-warning' + 'build-warning' end end diff --git a/app/views/ci/admin/builds/_build.html.haml b/app/views/ci/admin/builds/_build.html.haml index 47f8df8f98e..923219a2e46 100644 --- a/app/views/ci/admin/builds/_build.html.haml +++ b/app/views/ci/admin/builds/_build.html.haml @@ -1,5 +1,5 @@ - if build.commit && build.project - %tr.build.alert{class: build_status_alert_class(build)} + %tr.build{class: build_status_css_class(build)} %td.build-link = link_to ci_project_build_url(build.project, build) do %strong #{build.id} diff --git a/app/views/ci/admin/projects/_project.html.haml b/app/views/ci/admin/projects/_project.html.haml index 505dd4b3fdc..8017fb2086b 100644 --- a/app/views/ci/admin/projects/_project.html.haml +++ b/app/views/ci/admin/projects/_project.html.haml @@ -1,5 +1,5 @@ - last_commit = project.last_commit -%tr.alert{class: commit_status_alert_class(last_commit) } +%tr{class: commit_status_css_class(last_commit) } %td = project.id %td diff --git a/app/views/ci/admin/runners/show.html.haml b/app/views/ci/admin/runners/show.html.haml index 24e0ad3b070..409db6ba82c 100644 --- a/app/views/ci/admin/runners/show.html.haml +++ b/app/views/ci/admin/runners/show.html.haml @@ -102,7 +102,7 @@ %th Finished at - @builds.each do |build| - %tr.build.alert{class: build_status_alert_class(build)} + %tr.build.alert{class: build_status_css_class(build)} %td.status = build.status diff --git a/app/views/ci/builds/_build.html.haml b/app/views/ci/builds/_build.html.haml index da306c9f020..a53c64ba3f5 100644 --- a/app/views/ci/builds/_build.html.haml +++ b/app/views/ci/builds/_build.html.haml @@ -1,4 +1,4 @@ -%tr.build.alert{class: build_status_alert_class(build)} +%tr.build{class: build_status_css_class(build)} %td.status = build.status diff --git a/app/views/ci/builds/show.html.haml b/app/views/ci/builds/show.html.haml index d1e955b5012..2a08bf14f43 100644 --- a/app/views/ci/builds/show.html.haml +++ b/app/views/ci/builds/show.html.haml @@ -21,7 +21,7 @@ .row .col-md-9 - .build-head.alert{class: build_status_alert_class(@build)} + .build-head.alert{class: build_status_css_class(@build)} %h4 - if @build.commit.tag? Build for tag @@ -150,7 +150,7 @@ %h4.title #{pluralize(@builds.count, "other build")} for #{@build.short_sha}: %table.builds - @builds.each_with_index do |build, i| - %tr.build.alert{class: build_status_alert_class(build)} + %tr.build.alert{class: build_status_css_class(build)} %td = link_to ci_project_build_url(@project, build) do %span ##{build.id} diff --git a/app/views/ci/commits/_commit.html.haml b/app/views/ci/commits/_commit.html.haml index c1b1988d147..aa116fa12dc 100644 --- a/app/views/ci/commits/_commit.html.haml +++ b/app/views/ci/commits/_commit.html.haml @@ -1,4 +1,4 @@ -%tr.build.alert{class: commit_status_alert_class(commit)} +%tr.build{class: commit_status_css_class(commit)} %td.status = commit.status - if commit.running? diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml index 1aeb557314a..8f75d95b214 100644 --- a/app/views/ci/commits/show.html.haml +++ b/app/views/ci/commits/show.html.haml @@ -44,7 +44,7 @@ %h3 Status -.build.alert{class: commit_status_alert_class(@commit)} +.build.alert{class: commit_status_css_class(@commit)} .status = @commit.status.titleize diff --git a/app/views/ci/projects/_project.html.haml b/app/views/ci/projects/_project.html.haml index e4a811119e1..47415265b44 100644 --- a/app/views/ci/projects/_project.html.haml +++ b/app/views/ci/projects/_project.html.haml @@ -1,5 +1,5 @@ - last_commit = project.last_commit -%tr.alert{class: commit_status_alert_class(last_commit) } +%tr{class: commit_status_css_class(last_commit) } %td = link_to [:ci, project] do = project.name -- cgit v1.2.1 From 6776dcf90b9e101b8c9341ea83621e48f87584d6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 18 Sep 2015 18:24:33 +0200 Subject: Add colors to build labels Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/ci/projects.scss | 42 +++++++++++++++++++++++++++++++++ app/views/ci/builds/_build.html.haml | 3 ++- app/views/ci/commits/_commit.html.haml | 3 ++- app/views/ci/commits/show.html.haml | 4 ++-- app/views/ci/projects/index.html.haml | 18 +++++++------- 5 files changed, 57 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/ci/projects.scss b/app/assets/stylesheets/ci/projects.scss index 3b8a29269ad..43cf025c9af 100644 --- a/app/assets/stylesheets/ci/projects.scss +++ b/app/assets/stylesheets/ci/projects.scss @@ -13,6 +13,48 @@ .builds, .projects-table { + .build-danger { + .ci-status { + color: $gl-danger; + border-color: $gl-danger; + } + } + + .build-success { + .ci-status { + color: $gl-success; + border-color: $gl-success; + } + } + + .build-info { + .ci-status { + color: $gl-info; + border-color: $gl-info; + } + } + + .build-disabled { + .ci-status { + color: $gl-gray; + border-color: $gl-gray; + } + } + + .build-warning { + .ci-status { + color: $gl-warning; + border-color: $gl-warning; + } + } + + .ci-status { + padding: 2px 5px; + margin-right: 5px; + border: 1px solid #EEE; + @include border-radius(4px); + } + .light { border-color: $border-color; } diff --git a/app/views/ci/builds/_build.html.haml b/app/views/ci/builds/_build.html.haml index a53c64ba3f5..b31acec460d 100644 --- a/app/views/ci/builds/_build.html.haml +++ b/app/views/ci/builds/_build.html.haml @@ -1,6 +1,7 @@ %tr.build{class: build_status_css_class(build)} %td.status - = build.status + %span.ci-status< + = build.status %td.build-link = link_to ci_project_build_path(build.project, build) do diff --git a/app/views/ci/commits/_commit.html.haml b/app/views/ci/commits/_commit.html.haml index aa116fa12dc..4b2f5e28a4d 100644 --- a/app/views/ci/commits/_commit.html.haml +++ b/app/views/ci/commits/_commit.html.haml @@ -1,6 +1,7 @@ %tr.build{class: commit_status_css_class(commit)} %td.status - = commit.status + %span.ci-status< + = commit.status - if commit.running? · = commit.stage diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml index 8f75d95b214..477382bb6c1 100644 --- a/app/views/ci/commits/show.html.haml +++ b/app/views/ci/commits/show.html.haml @@ -44,8 +44,8 @@ %h3 Status -.build.alert{class: commit_status_css_class(@commit)} - .status +.build{class: commit_status_css_class(@commit)} + .ci-status = @commit.status.titleize %h3 diff --git a/app/views/ci/projects/index.html.haml b/app/views/ci/projects/index.html.haml index 8de205d57aa..2b618d61f79 100644 --- a/app/views/ci/projects/index.html.haml +++ b/app/views/ci/projects/index.html.haml @@ -11,16 +11,16 @@ by keyword: "#{params[:search]}", #{@total_count} projects - .wide-table-holder - %table.table.projects-table.content-list - %thead - %tr - %th Project Name - %th Last commit - %th Access - %th Commits + .wide-table-holder + %table.table.projects-table.content-list + %thead + %tr + %th Project Name + %th Last commit + %th Access + %th Commits - = render @projects + = render @projects %p.text-center.hide.loading %i.fa.fa-refresh.fa-spin :coffeescript -- cgit v1.2.1 From 34da6f00f6a1513703232bd071237c1ed402b6d1 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 19 Sep 2015 00:21:24 +0200 Subject: Return callout css for CI Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/generic/callout.scss | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 app/assets/stylesheets/generic/callout.scss diff --git a/app/assets/stylesheets/generic/callout.scss b/app/assets/stylesheets/generic/callout.scss new file mode 100644 index 00000000000..f1699d21c9b --- /dev/null +++ b/app/assets/stylesheets/generic/callout.scss @@ -0,0 +1,45 @@ +/* + * Callouts from Bootstrap3 docs + * + * Not quite alerts, but custom and helpful notes for folks reading the docs. + * Requires a base and modifier class. + */ + +/* Common styles for all types */ +.bs-callout { + margin: 20px 0; + padding: 20px; + border-left: 3px solid #eee; + color: #666; + background: #f9f9f9; +} +.bs-callout h4 { + margin-top: 0; + margin-bottom: 5px; +} +.bs-callout p:last-child { + margin-bottom: 0; +} + +/* Variations */ +.bs-callout-danger { + background-color: #fdf7f7; + border-color: #eed3d7; + color: #b94a48; +} +.bs-callout-warning { + background-color: #faf8f0; + border-color: #faebcc; + color: #8a6d3b; +} +.bs-callout-info { + background-color: #f4f8fa; + border-color: #bce8f1; + color: #34789a; +} +.bs-callout-success { + background-color: #dff0d8; + border-color: #5cA64d; + color: #3c763d; +} + -- cgit v1.2.1 From 4daffbe4064e0f39e401c962bb0c0f2d8a092810 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 19 Sep 2015 01:40:44 +0200 Subject: Cleanup GitLab CI UI Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/ci/projects.scss | 83 +++++++++++--------------- app/helpers/ci/application_helper.rb | 22 +++++++ app/helpers/ci/builds_helper.rb | 22 ------- app/helpers/ci/commits_helper.rb | 15 ----- app/views/ci/admin/builds/_build.html.haml | 4 +- app/views/ci/admin/projects/_project.html.haml | 5 +- app/views/ci/admin/runners/show.html.haml | 4 +- app/views/ci/builds/_build.html.haml | 5 +- app/views/ci/builds/show.html.haml | 69 +++++++++++---------- app/views/ci/commits/_commit.html.haml | 5 +- app/views/ci/commits/show.html.haml | 55 +++++++++-------- app/views/ci/projects/_project.html.haml | 5 +- 12 files changed, 132 insertions(+), 162 deletions(-) diff --git a/app/assets/stylesheets/ci/projects.scss b/app/assets/stylesheets/ci/projects.scss index 43cf025c9af..c63a67ab720 100644 --- a/app/assets/stylesheets/ci/projects.scss +++ b/app/assets/stylesheets/ci/projects.scss @@ -13,48 +13,6 @@ .builds, .projects-table { - .build-danger { - .ci-status { - color: $gl-danger; - border-color: $gl-danger; - } - } - - .build-success { - .ci-status { - color: $gl-success; - border-color: $gl-success; - } - } - - .build-info { - .ci-status { - color: $gl-info; - border-color: $gl-info; - } - } - - .build-disabled { - .ci-status { - color: $gl-gray; - border-color: $gl-gray; - } - } - - .build-warning { - .ci-status { - color: $gl-warning; - border-color: $gl-warning; - } - } - - .ci-status { - padding: 2px 5px; - margin-right: 5px; - border: 1px solid #EEE; - @include border-radius(4px); - } - .light { border-color: $border-color; } @@ -75,23 +33,16 @@ } .commit-info { - font-size: 14px; - .attr-name { - font-weight: 300; - color: #666; margin-right: 5px; } pre.commit-message { - font-size: 14px; background: none; padding: 0; margin: 0; border: none; margin: 20px 0; - border-bottom: 1px solid #EEE; - padding-bottom: 20px; border-radius: 0; } } @@ -105,4 +56,38 @@ margin-bottom: 16px; } } + + .ci-status { + padding: 2px 7px; + margin-right: 5px; + border: 1px solid #EEE; + white-space: nowrap; + @include border-radius(4px); + + &.ci-failed { + color: $gl-danger; + border-color: $gl-danger; + } + + &.ci-success { + color: $gl-success; + border-color: $gl-success; + } + + &.ci-info { + color: $gl-info; + border-color: $gl-info; + } + + &.ci-disabled { + color: $gl-gray; + border-color: $gl-gray; + } + + &.ci-pending, + &.ci-running { + color: $gl-warning; + border-color: $gl-warning; + } + } } diff --git a/app/helpers/ci/application_helper.rb b/app/helpers/ci/application_helper.rb index 7e880b00b3a..9fe6282bb81 100644 --- a/app/helpers/ci/application_helper.rb +++ b/app/helpers/ci/application_helper.rb @@ -28,5 +28,27 @@ module Ci "#{pluralize(seconds, "second")}" end end + + def ci_icon_for_status(status) + icon_name = + case status + when 'success' + 'check-square' + when 'failed' + 'close' + when 'running', 'pending' + 'clock-o' + else + 'circle' + end + + icon(icon_name) + end + + def ci_status_with_icon(status) + content_tag :span, class: "ci-status ci-#{status}" do + ci_icon_for_status(status) + ' '.html_safe + status + end + end end end diff --git a/app/helpers/ci/builds_helper.rb b/app/helpers/ci/builds_helper.rb index 422994f5984..5d6e785d951 100644 --- a/app/helpers/ci/builds_helper.rb +++ b/app/helpers/ci/builds_helper.rb @@ -15,27 +15,5 @@ module Ci def build_url(build) ci_project_build_url(build.project, build) end - - def build_status_css_class(build) - if build.success? - 'build-success' - elsif build.failed? - 'build-danger' - elsif build.canceled? - 'build-disabled' - else - 'build-warning' - end - end - - def build_icon_css_class(build) - if build.success? - 'fa-circle cgreen' - elsif build.failed? - 'fa-circle cred' - else - 'fa-circle light' - end - end end end diff --git a/app/helpers/ci/commits_helper.rb b/app/helpers/ci/commits_helper.rb index 2c86bbffa36..9069aed5b4d 100644 --- a/app/helpers/ci/commits_helper.rb +++ b/app/helpers/ci/commits_helper.rb @@ -1,20 +1,5 @@ module Ci module CommitsHelper - def commit_status_css_class(commit) - return 'build-info' unless commit - - case commit.status - when 'success' - 'build-success' - when 'failed', 'canceled' - 'build-danger' - when 'skipped' - 'build-disabled' - else - 'build-warning' - end - end - def ci_commit_path(commit) ci_project_ref_commits_path(commit.project, commit.ref, commit.sha) end diff --git a/app/views/ci/admin/builds/_build.html.haml b/app/views/ci/admin/builds/_build.html.haml index 923219a2e46..778d51d03be 100644 --- a/app/views/ci/admin/builds/_build.html.haml +++ b/app/views/ci/admin/builds/_build.html.haml @@ -1,11 +1,11 @@ - if build.commit && build.project - %tr.build{class: build_status_css_class(build)} + %tr.build %td.build-link = link_to ci_project_build_url(build.project, build) do %strong #{build.id} %td.status - = build.status + = ci_status_with_icon(build.status) %td.commit-link = commit_link(build.commit) diff --git a/app/views/ci/admin/projects/_project.html.haml b/app/views/ci/admin/projects/_project.html.haml index 8017fb2086b..c461206c72a 100644 --- a/app/views/ci/admin/projects/_project.html.haml +++ b/app/views/ci/admin/projects/_project.html.haml @@ -1,5 +1,5 @@ - last_commit = project.last_commit -%tr{class: commit_status_css_class(last_commit) } +%tr %td = project.id %td @@ -7,8 +7,9 @@ %strong= project.name %td - if last_commit - #{last_commit.status} (#{commit_link(last_commit)}) + = ci_status_with_icon(last_commit.status) - if project.last_commit_date + · = time_ago_in_words project.last_commit_date ago - else diff --git a/app/views/ci/admin/runners/show.html.haml b/app/views/ci/admin/runners/show.html.haml index 409db6ba82c..09905e0eb47 100644 --- a/app/views/ci/admin/runners/show.html.haml +++ b/app/views/ci/admin/runners/show.html.haml @@ -102,9 +102,9 @@ %th Finished at - @builds.each do |build| - %tr.build.alert{class: build_status_css_class(build)} + %tr.build %td.status - = build.status + = ci_status_with_icon(build.status) %td.status = build.project.name diff --git a/app/views/ci/builds/_build.html.haml b/app/views/ci/builds/_build.html.haml index b31acec460d..515b862e992 100644 --- a/app/views/ci/builds/_build.html.haml +++ b/app/views/ci/builds/_build.html.haml @@ -1,7 +1,6 @@ -%tr.build{class: build_status_css_class(build)} +%tr.build %td.status - %span.ci-status< - = build.status + = ci_status_with_icon(build.status) %td.build-link = link_to ci_project_build_path(build.project, build) do diff --git a/app/views/ci/builds/show.html.haml b/app/views/ci/builds/show.html.haml index 2a08bf14f43..839dbf5c554 100644 --- a/app/views/ci/builds/show.html.haml +++ b/app/views/ci/builds/show.html.haml @@ -1,15 +1,16 @@ #up-build-trace - if @commit.matrix? - %ul.nav.nav-tabs.append-bottom-10 + %ul.center-top-menu - @commit.builds_without_retry_sorted.each do |build| %li{class: ('active' if build == @build) } = link_to ci_project_build_url(@project, build) do - %i{class: build_icon_css_class(build)} + = ci_icon_for_status(build.status) %span - Build ##{build.id} - if build.name - · = build.name + - else + = build.id + - unless @commit.builds_without_retry.include?(@build) %li.active @@ -19,34 +20,33 @@ %i.fa.fa-warning-sign This build was retried. -.row - .col-md-9 - .build-head.alert{class: build_status_css_class(@build)} - %h4 - - if @build.commit.tag? - Build for tag - %code #{@build.ref} - - else - Build for commit - %code #{@build.short_sha} - from - - = link_to ci_project_path(@build.project, ref: @build.ref) do - %span.label.label-primary= "#{@build.ref}" - - - if @build.duration - .pull-right - %span - %i.fa.fa-time - #{duration_in_words(@build.finished_at, @build.started_at)} +.gray-content-block + .build-head + %h4 + - if @build.commit.tag? + Build for tag + %code #{@build.ref} + - else + Build for commit + %strong.monospace= commit_link(@build.commit) + from - .clearfix - = @build.status - .pull-right - = @build.updated_at.stamp('19:00 Aug 27') + = link_to ci_project_path(@build.project, ref: @build.ref) do + %strong.monospace= "#{@build.ref}" + - if @build.duration + .pull-right + %span + %i.fa.fa-time + #{duration_in_words(@build.finished_at, @build.started_at)} + .clearfix + = ci_status_with_icon(@build.status) + .pull-right + = @build.updated_at.stamp('19:00 Aug 27') +.row.prepend-top-default + .col-md-9 .clearfix - if @build.active? .autoscroll-container @@ -150,13 +150,16 @@ %h4.title #{pluralize(@builds.count, "other build")} for #{@build.short_sha}: %table.builds - @builds.each_with_index do |build, i| - %tr.build.alert{class: build_status_css_class(build)} + %tr.build %td - = link_to ci_project_build_url(@project, build) do - %span ##{build.id} + = ci_icon_for_status(build.status) %td - - if build.name - = build.name + = link_to ci_project_build_url(@project, build) do + - if build.name + = build.name + - else + %span ##{build.id} + %td.status= build.status diff --git a/app/views/ci/commits/_commit.html.haml b/app/views/ci/commits/_commit.html.haml index 4b2f5e28a4d..1eacfca944f 100644 --- a/app/views/ci/commits/_commit.html.haml +++ b/app/views/ci/commits/_commit.html.haml @@ -1,7 +1,6 @@ -%tr.build{class: commit_status_css_class(commit)} +%tr.build %td.status - %span.ci-status< - = commit.status + = ci_status_with_icon(commit.status) - if commit.running? · = commit.stage diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml index 477382bb6c1..8f38aa84676 100644 --- a/app/views/ci/commits/show.html.haml +++ b/app/views/ci/commits/show.html.haml @@ -1,29 +1,34 @@ .commit-info - %pre.commit-message - #{@commit.git_commit_message} + .append-bottom-20 + = ci_status_with_icon(@commit.status) - .row - .col-sm-6 - - if @commit.compare? - %p - %span.attr-name Compare: - #{gitlab_compare_link(@project, @commit.short_before_sha, @commit.short_sha)} - - else - %p - %span.attr-name Commit: - #{gitlab_commit_link(@project, @commit.sha)} + .gray-content-block.middle-block + %pre.commit-message + #{@commit.git_commit_message} + + .gray-content-block.second-block + .row + .col-sm-6 + - if @commit.compare? + %p + %span.attr-name Compare: + #{gitlab_compare_link(@project, @commit.short_before_sha, @commit.short_sha)} + - else + %p + %span.attr-name Commit: + #{gitlab_commit_link(@project, @commit.sha)} - %p - %span.attr-name Branch: - #{gitlab_ref_link(@project, @commit.ref)} - .col-sm-6 - %p - %span.attr-name Author: - #{@commit.git_author_name} (#{@commit.git_author_email}) - - if @commit.created_at %p - %span.attr-name Created at: - #{@commit.created_at.to_s(:short)} + %span.attr-name Branch: + #{gitlab_ref_link(@project, @commit.ref)} + .col-sm-6 + %p + %span.attr-name Author: + #{@commit.git_author_name} (#{@commit.git_author_email}) + - if @commit.created_at + %p + %span.attr-name Created at: + #{@commit.created_at.to_s(:short)} - if current_user && can?(current_user, :manage_builds, gl_project) .pull-right @@ -42,12 +47,6 @@ .bs-callout.bs-callout-warning \.gitlab-ci.yml not found in this commit -%h3 Status - -.build{class: commit_status_css_class(@commit)} - .ci-status - = @commit.status.titleize - %h3 Builds - if @commit.duration > 0 diff --git a/app/views/ci/projects/_project.html.haml b/app/views/ci/projects/_project.html.haml index 29e9f023dda..844b6677b3d 100644 --- a/app/views/ci/projects/_project.html.haml +++ b/app/views/ci/projects/_project.html.haml @@ -1,14 +1,13 @@ - if project.gitlab_ci_project - ci_project = project.gitlab_ci_project - last_commit = ci_project.last_commit - %tr{class: commit_status_css_class(last_commit) } + %tr %td = link_to [:ci, ci_project] do = ci_project.name %td - if last_commit - %span.ci-status< - = last_commit.status + = ci_status_with_icon(last_commit.status) = commit_link(last_commit) · - if ci_project.last_commit_date -- cgit v1.2.1