diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-14 15:33:56 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-18 14:14:52 +0200 |
commit | fcd2bdf1fe83a4d39a6c3af6d03d09500f93ca4d (patch) | |
tree | f13008530f1e36a83e6e5d33236dd0461ef89ee4 /lib/charts.rb | |
parent | e3041b90dc4b02a1bd9b68e820d19f4a58488940 (diff) | |
download | gitlab-ci-migrate-tables-to-ci-prefix.tar.gz |
Migrate tablesmigrate-tables-to-ci-prefix
Revert some
Make it work
Migrate tags and taggings to
Diffstat (limited to 'lib/charts.rb')
-rw-r--r-- | lib/charts.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/charts.rb b/lib/charts.rb index 93e81a5..2472050 100644 --- a/lib/charts.rb +++ b/lib/charts.rb @@ -16,10 +16,10 @@ module Charts def push(from, to, format) @labels << from.strftime(format) @total << project.builds. - where('? > builds.created_at AND builds.created_at > ?', to, from). + where('? > ci_builds.created_at AND ci_builds.created_at > ?', to, from). count(:all) @success << project.builds. - where('? > builds.created_at AND builds.created_at > ?', to, from). + where('? > ci_builds.created_at AND ci_builds.created_at > ?', to, from). success.count(:all) end end @@ -59,7 +59,7 @@ module Charts class BuildTime < Chart def collect - commits = project.commits.joins(:builds).where('builds.finished_at is NOT NULL AND builds.started_at is NOT NULL').last(30) + commits = project.commits.joins(:builds).where('ci_builds.finished_at is NOT NULL AND ci_builds.started_at is NOT NULL').last(30) commits.each do |commit| @labels << commit.short_sha @build_times << (commit.duration / 60) |