diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-06-25 12:07:16 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-06-25 12:07:16 +0200 |
commit | 69dda500a40e81722803c78be84fa780900e3a8f (patch) | |
tree | 5fba5f4b25dcd94c61ca4493c100841a0b084a98 | |
parent | 0799eeb86215bbf62dddf049ee8a958cf9fa58d0 (diff) | |
download | sonarqube-69dda500a40e81722803c78be84fa780900e3a8f.tar.gz sonarqube-69dda500a40e81722803c78be84fa780900e3a8f.zip |
SONAR-4439 OutOfMemory in the page "Clouds"
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb index 9f642d23dff..3c1fd751590 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb @@ -44,18 +44,19 @@ class CloudController < ApplicationController @snapshots=Snapshot.find(:all, :conditions => [snapshot_conditions, snapshot_values], :include => 'project', :order => 'projects.name') size_measures=ProjectMeasure.find(:all, - :select => 'project_measures.id,project_measures.value,project_measures.metric_id,project_measures.snapshot_id,project_measures.rule_id,project_measures.rule_priority,project_measures.text_value,project_measures.characteristic_id,project_measures.alert_status', + :select => 'project_measures.id,project_measures.value,project_measures.metric_id,project_measures.snapshot_id,project_measures.rule_id,project_measures.text_value,project_measures.characteristic_id,project_measures.alert_status', :joins => :snapshot, - :conditions => [snapshot_conditions + " AND project_measures.metric_id=#{@size_metric.id}", snapshot_values], + :conditions => [snapshot_conditions + " AND project_measures.metric_id=#{@size_metric.id} AND project_measures.rule_id IS NULL AND project_measures.characteristic_id IS NULL AND project_measures.person_id IS NULL", snapshot_values], :order => 'project_measures.value') color_measures=ProjectMeasure.find(:all, - :select => 'project_measures.id,project_measures.value,project_measures.metric_id,project_measures.snapshot_id,project_measures.rule_id,project_measures.rule_priority,project_measures.text_value,project_measures.characteristic_id,project_measures.alert_status', + :select => 'project_measures.id,project_measures.value,project_measures.metric_id,project_measures.snapshot_id,project_measures.rule_id,project_measures.text_value,project_measures.characteristic_id,project_measures.alert_status', :joins => :snapshot, - :conditions => [snapshot_conditions + " AND project_measures.metric_id=#{@color_metric.id} AND project_measures.rule_id IS NULL AND "+ "project_measures.characteristic_id IS NULL AND project_measures.person_id IS NULL", snapshot_values], + :conditions => [snapshot_conditions + " AND project_measures.metric_id=#{@color_metric.id} AND project_measures.rule_id IS NULL AND project_measures.characteristic_id IS NULL AND project_measures.person_id IS NULL", snapshot_values], :order => 'project_measures.value') - @size_measure_by_sid={}, @color_measure_by_sid={} + @size_measure_by_sid={} + @color_measure_by_sid={} size_measures.each do |m| @size_measure_by_sid[m.snapshot_id]=m end |