]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4439 OutOfMemory in the page "Clouds"
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 25 Jun 2013 10:07:16 +0000 (12:07 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 25 Jun 2013 10:07:41 +0000 (12:07 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb

index 9f642d23dffff81aedf4bef970d6d27c03814cd6..3c1fd7515907ab6c82b3c0186bfe93a4d660eb70 100644 (file)
@@ -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