diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-09-06 14:31:37 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-09-12 22:32:02 +0300 |
commit | e83a8187510b3c44cfd699109ac0bcf02f693fbd (patch) | |
tree | 5ed2ae7542327e628878eae16538de2c85f192d5 /lib | |
parent | 5b296f81e2f49fc7dc2d3b091340a9a8b86eae97 (diff) | |
download | gitlab-ce-e83a8187510b3c44cfd699109ac0bcf02f693fbd.tar.gz |
adds changelog
fix CI
fix CI
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/charts.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/ci/charts.rb b/lib/gitlab/ci/charts.rb index ac4bd5d6684..7df7b542d91 100644 --- a/lib/gitlab/ci/charts.rb +++ b/lib/gitlab/ci/charts.rb @@ -4,7 +4,7 @@ module Gitlab module DailyInterval def grouped_count(query) query - .group("DATE(#{Ci::Pipeline.table_name}.created_at)") + .group("DATE(#{::Ci::Pipeline.table_name}.created_at)") .count(:created_at) .transform_keys { |date| date.strftime(@format) } end @@ -18,12 +18,12 @@ module Gitlab def grouped_count(query) if Gitlab::Database.postgresql? query - .group("to_char(#{Ci::Pipeline.table_name}.created_at, '01 Month YYYY')") + .group("to_char(#{::Ci::Pipeline.table_name}.created_at, '01 Month YYYY')") .count(:created_at) .transform_keys(&:squish) else query - .group("DATE_FORMAT(#{Ci::Pipeline.table_name}.created_at, '01 %M %Y')") + .group("DATE_FORMAT(#{::Ci::Pipeline.table_name}.created_at, '01 %M %Y')") .count(:created_at) end end @@ -48,7 +48,7 @@ module Gitlab def collect query = project.pipelines - .where("? > #{Ci::Pipeline.table_name}.created_at AND #{Ci::Pipeline.table_name}.created_at > ?", @to, @from) # rubocop:disable GitlabSecurity/SqlInjection + .where("? > #{::Ci::Pipeline.table_name}.created_at AND #{::Ci::Pipeline.table_name}.created_at > ?", @to, @from) # rubocop:disable GitlabSecurity/SqlInjection totals_count = grouped_count(query) success_count = grouped_count(query.success) |