diff options
3 files changed, 6 insertions, 14 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/treemap.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/treemap.html.erb index 313e13f2c0d..b12ca554f18 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/treemap.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/treemap.html.erb @@ -22,10 +22,9 @@ <% filter = MeasureFilter.new filter.set_criteria_value(:base, @resource.key) - filter.set_criteria_value(:display, 'treemap') - filter.set_criteria_value(:tmSize, sizeMetric.key) if sizeMetric - filter.set_criteria_value(:tmColor, colorMetric.key) if colorMetric - filter.set_criteria_value(:tmHeight, widget_properties['heightInPercents']) + filter.set_criteria_value(:pageSize, 100) + filter.set_criteria_value(:page, 1) + filter.metrics=([sizeMetric, colorMetric].compact) filter.execute(self, :user => current_user) %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb index 134c32398e7..80fcefff882 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb @@ -242,7 +242,6 @@ class MeasuresController < ApplicationController filter = find_filter(params[:filter]) filter.load_criteria_from_data - params[:display] = 'none' filter.override_criteria(criteria_params) filter.metrics= params[:metrics].split(',') if metrics filter.require_links= display_links diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/models/measure_filter_display.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/models/measure_filter_display.rb index 5763d3179db..8066e3d59ba 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/models/measure_filter_display.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/models/measure_filter_display.rb @@ -19,16 +19,10 @@ # class MeasureFilterDisplay - DISPLAY_CLASSES = [MeasureFilterDisplayList] - def self.create(filter, options) - key = filter.criteria('display') - display_class=DISPLAY_CLASSES.find{|display_class| display_class::KEY==key.to_sym} if key - display_class.new(filter, options) if display_class - end - - def self.keys - DISPLAY_CLASSES.map{|display_class| display_class::KEY} + # Do not init a MeasureFilterDisplayList when we want to completely control the render (column to return, pagination, etc.) of the filter + # For instance, the /measures/search_filter manage by itself the column and the pagination + MeasureFilterDisplayList.new(filter, options) if filter.criteria('display') == 'list' end def key |