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