]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5214 Remove violations_density from hard coded config values
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 10 Apr 2014 14:01:43 +0000 (16:01 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 10 Apr 2014 14:31:24 +0000 (16:31 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboard.java
sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter_display_treemap.rb

index de760fd113aaa7b7bda0b749aeb2a6c0f5fe2d41..f7933cfbbf4a6765e3f0b3ec5356467cd3de870f 100644 (file)
@@ -78,7 +78,7 @@ public final class GlobalDefaultDashboard extends DashboardTemplate {
         .addWidget(MeasureFilterTreemapWidget.ID, 2)
         .setProperty(MeasureFilterListWidget.FILTER_PROPERTY, filter.getId().toString())
         .setProperty(MeasureFilterTreemapWidget.SIZE_METRIC_PROPERTY, "ncloc")
-        .setProperty(MeasureFilterTreemapWidget.COLOR_METRIC_PROPERTY, "violations_density");
+        .setProperty(MeasureFilterTreemapWidget.COLOR_METRIC_PROPERTY, "coverage");
     }
   }
 
index 75cee0870fb03a3e05fe1f2ee973fbac1dcbeda9..067f707aee53e671266729aec71438bd4ee21fd0 100644 (file)
@@ -31,7 +31,7 @@ class MeasureFilterDisplayTreemap < MeasureFilterDisplay
     super(filter, options)
 
     @size_metric = Metric.by_key(@filter.criteria(:tmSize)||'ncloc')
-    @color_metric = Metric.by_key(@filter.criteria(:tmColor)||'violations_density')
+    @color_metric = Metric.by_key(@filter.criteria(:tmColor)||'coverage')
     @height_percents = (@filter.criteria(:tmHeight) || DEFAULT_HEIGHT_PERCENTS).to_i
     @height_percents = DEFAULT_HEIGHT_PERCENTS if @height_percents<=0
     @filter.metrics=([@size_metric, @color_metric].compact)