aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-07-18 15:53:36 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-07-18 16:18:03 +0200
commitda86cf4808159ae70677f20b3d2b16383e2045ac (patch)
treea2babbe319d9e838b4a9abd61da05be5bfbd08d0 /server
parent6a5f7d47f8d5443cd394eca2b10db8bbe4887a75 (diff)
downloadsonarqube-da86cf4808159ae70677f20b3d2b16383e2045ac.tar.gz
sonarqube-da86cf4808159ae70677f20b3d2b16383e2045ac.zip
SONAR-5207 Fix display of treemap
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb1
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/models/measure_filter_display.rb12
2 files changed, 3 insertions, 10 deletions
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