diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-10 11:49:38 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-10 11:49:38 +0100 |
commit | 1b7a2fc5363d7e2334f5c48940e8eca9d88354a6 (patch) | |
tree | ae5cca21b3b328e2df110e351cc83257a5363523 /lib | |
parent | 354b69dde2ba399a4269a0f544fd7a4e399d8b7e (diff) | |
download | gitlab-ce-1b7a2fc5363d7e2334f5c48940e8eca9d88354a6.tar.gz |
Improve Continuous Integration graphs page
* fix commit duration graph
* make graphs responsive
* fix wrong padding
* add a bit of explanation to colors
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/charts.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ci/charts.rb b/lib/ci/charts.rb index 915a4f526a6..5ff7407c6fe 100644 --- a/lib/ci/charts.rb +++ b/lib/ci/charts.rb @@ -60,7 +60,8 @@ module Ci class BuildTime < Chart def collect - commits = project.commits.joins(:builds).where("#{Ci::Build.table_name}.finished_at is NOT NULL AND #{Ci::Build.table_name}.started_at is NOT NULL").last(30) + commits = project.commits.last(30) + commits.each do |commit| @labels << commit.short_sha @build_times << (commit.duration / 60) |