diff options
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb index 44855d4077f..39497a9ed18 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb @@ -65,33 +65,7 @@ class TrendsChart ProjectMeasure.connection.select_all(Project.send(:sanitize_sql, conditions)) end end - - def self.time_machine_reviews(resource, metric_ids, options={}) - unless metric_ids.empty? - sql= "SELECT m.measure_date as created_at, m.value as value, m.metric_id as metric_id " + - "FROM project_measures m " + - "WHERE m.snapshot_id IS NULL " + - "AND m.rule_id is null " + - "AND m.project_id=? " + - "AND m.metric_id in (?) " + - "and m.rule_priority is null and m.characteristic_id IS NULL" - if (options[:from]) - sql += ' and m.measure_date>=?' - end - if (options[:to]) - sql += ' and m.measure_date<=?' - end - conditions=[sql, resource.id, metric_ids] - if (options[:from]) - conditions<<options[:from] - end - if (options[:to]) - conditions<<options[:to] - end - ProjectMeasure.connection.select_all(Project.send(:sanitize_sql, conditions)) - end - end - + def self.add_measures(java_chart, sqlresult) if sqlresult && sqlresult.size>0 sqlresult.each do |hash| |