diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-27 03:47:18 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-27 03:47:18 +0300 |
commit | 6afd69f4445cc0688aa1695389eb3f79033e3121 (patch) | |
tree | 729b58c8a0a7013e4166dca05e2e68adfe274a1d /lib/ci/charts.rb | |
parent | 046b28312704f3131e72dcd2dbdacc5264d4aa62 (diff) |
Update gitignore, change literal DB table names, fix errors, fix fontawesome
Diffstat (limited to 'lib/ci/charts.rb')
-rw-r--r-- | lib/ci/charts.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ci/charts.rb b/lib/ci/charts.rb index e50a7a59c27..915a4f526a6 100644 --- a/lib/ci/charts.rb +++ b/lib/ci/charts.rb @@ -17,10 +17,10 @@ module Ci def push(from, to, format) @labels << from.strftime(format) @total << project.builds. - where('? > builds.created_at AND builds.created_at > ?', to, from). + where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?", to, from). count(:all) @success << project.builds. - where('? > builds.created_at AND builds.created_at > ?', to, from). + where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?", to, from). success.count(:all) end end @@ -60,7 +60,7 @@ module Ci 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::Build.table_name}.finished_at is NOT NULL AND #{Ci::Build.table_name}.started_at is NOT NULL").last(30) commits.each do |commit| @labels << commit.short_sha @build_times << (commit.duration / 60) |