aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-06-01 17:28:59 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-06-01 17:31:44 +0200
commit7289e004f966f833c9ee199a35e90e0af94296ac (patch)
tree731a7e750b949b6cbff80150932426c67aacf99d /sonar-server
parent4dd1285dcd75fef97a0c267e2efee68ad076d582 (diff)
downloadsonarqube-7289e004f966f833c9ee199a35e90e0af94296ac.tar.gz
sonarqube-7289e004f966f833c9ee199a35e90e0af94296ac.zip
SONAR-3537 Improve performances of the treemap filter
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
index e1e9fffd571..5729a5283ee 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
@@ -44,7 +44,7 @@ class DashboardController < ApplicationController
load_resource()
load_dashboard()
@category=params[:category]
- load_widget_definitions(@dashboard, @category)
+ load_widget_definitions(@category)
unless @dashboard
redirect_to home_path
end
@@ -136,7 +136,7 @@ class DashboardController < ApplicationController
@category=params[:category]
load_resource()
load_dashboard()
- load_widget_definitions(@dashboard, @category)
+ load_widget_definitions(@category)
render :partial => 'widget_definitions', :locals => {:category => @category}
end
@@ -185,7 +185,7 @@ class DashboardController < ApplicationController
end
end
- def load_widget_definitions(dashboard, filter_on_category=nil)
+ def load_widget_definitions(filter_on_category)
@widget_definitions=java_facade.getWidgets()
@widget_categories=@widget_definitions.map(&:getWidgetCategories).flatten.uniq.sort
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb
index bc7b8524922..060e743aae4 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb
@@ -55,7 +55,7 @@
# load measures
#
if @metric_ids.size>0
- measures=ProjectMeasure.find(:all, :conditions => ['rule_priority is null and rule_id is null and characteristic_id is null and person_id is null and snapshot_id in (?)', @page_sids])
+ measures=ProjectMeasure.find(:all, :conditions => ['rule_priority is null and rule_id is null and characteristic_id is null and person_id is null and snapshot_id in (?) and metric_id in (?)', @page_sids, @metric_ids])
measures.each do |m|
snapshot=@snapshots_by_id[m.snapshot_id]