]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5214 Remove references to deprecated violations_density metric
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 10 Apr 2014 13:37:49 +0000 (15:37 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 10 Apr 2014 13:37:49 +0000 (15:37 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/ProjectTimeMachineDashboard.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TreemapWidget.java
sonar-server/src/main/java/org/sonar/server/ui/DefaultPages.java

index 18834e6e2f124e158e33c18bb226348161de9aea..ae4f75d12e15ea0a9972c9f000101308e252455b 100644 (file)
@@ -39,6 +39,7 @@ public final class ProjectTimeMachineDashboard extends DashboardTemplate {
   private static final String METRIC5 = "metric5";
   private static final String METRIC6 = "metric6";
   private static final String METRIC7 = "metric7";
+  private static final String METRIC8 = "metric8";
 
   @Override
   public String getName() {
@@ -57,7 +58,7 @@ public final class ProjectTimeMachineDashboard extends DashboardTemplate {
   private void addFirstColumn(Dashboard dashboard) {
     Widget timelineWidget = dashboard.addWidget("timeline", 1);
     timelineWidget.setProperty(METRIC1, CoreMetrics.COMPLEXITY_KEY);
-    timelineWidget.setProperty(METRIC2, CoreMetrics.VIOLATIONS_DENSITY_KEY);
+    timelineWidget.setProperty(METRIC2, CoreMetrics.TECHNICAL_DEBT_KEY);
     timelineWidget.setProperty(METRIC3, CoreMetrics.COVERAGE_KEY);
 
     Widget sizeTimeMachineWidget = addTimeMachineWidgetOnFirstColumn(dashboard);
@@ -85,12 +86,11 @@ public final class ProjectTimeMachineDashboard extends DashboardTemplate {
   private void addSecondColumn(Dashboard dashboard) {
     Widget rulesTimeMachineWidget = addTimeMachineWidgetOnSecondColumn(dashboard);
     rulesTimeMachineWidget.setProperty(METRIC1, CoreMetrics.VIOLATIONS_KEY);
-    rulesTimeMachineWidget.setProperty(METRIC2, CoreMetrics.VIOLATIONS_DENSITY_KEY);
-    rulesTimeMachineWidget.setProperty(METRIC3, CoreMetrics.BLOCKER_VIOLATIONS_KEY);
-    rulesTimeMachineWidget.setProperty(METRIC4, CoreMetrics.CRITICAL_VIOLATIONS_KEY);
-    rulesTimeMachineWidget.setProperty(METRIC5, CoreMetrics.MAJOR_VIOLATIONS_KEY);
-    rulesTimeMachineWidget.setProperty(METRIC6, CoreMetrics.MINOR_VIOLATIONS_KEY);
-    rulesTimeMachineWidget.setProperty(METRIC7, CoreMetrics.INFO_VIOLATIONS_KEY);
+    rulesTimeMachineWidget.setProperty(METRIC2, CoreMetrics.BLOCKER_VIOLATIONS_KEY);
+    rulesTimeMachineWidget.setProperty(METRIC3, CoreMetrics.CRITICAL_VIOLATIONS_KEY);
+    rulesTimeMachineWidget.setProperty(METRIC4, CoreMetrics.MAJOR_VIOLATIONS_KEY);
+    rulesTimeMachineWidget.setProperty(METRIC5, CoreMetrics.MINOR_VIOLATIONS_KEY);
+    rulesTimeMachineWidget.setProperty(METRIC6, CoreMetrics.INFO_VIOLATIONS_KEY);
     rulesTimeMachineWidget.setProperty(METRIC7, CoreMetrics.WEIGHTED_VIOLATIONS_KEY);
 
     Widget complexityTimeMachineWidget = addTimeMachineWidgetOnSecondColumn(dashboard);
@@ -107,7 +107,7 @@ public final class ProjectTimeMachineDashboard extends DashboardTemplate {
     testsTimeMachineWidget.setProperty(METRIC5, CoreMetrics.TEST_FAILURES_KEY);
     testsTimeMachineWidget.setProperty(METRIC6, CoreMetrics.TEST_ERRORS_KEY);
     testsTimeMachineWidget.setProperty(METRIC7, CoreMetrics.TESTS_KEY);
-    testsTimeMachineWidget.setProperty(METRIC7, CoreMetrics.TEST_EXECUTION_TIME_KEY);
+    testsTimeMachineWidget.setProperty(METRIC8, CoreMetrics.TEST_EXECUTION_TIME_KEY);
   }
 
   private Widget addTimeMachineWidgetOnFirstColumn(Dashboard dashboard) {
index 508925942afd340e206934d7a4c5aff838f55a21..6ce87b3be752fea477120573148d26d8392e1e80 100644 (file)
@@ -26,7 +26,7 @@ import org.sonar.api.web.WidgetPropertyType;
 
 @WidgetProperties({
   @WidgetProperty(key = "sizeMetric", type = WidgetPropertyType.METRIC, defaultValue = CoreMetrics.NCLOC_KEY, options = {WidgetConstants.FILTER_OUT_NEW_METRICS}),
-  @WidgetProperty(key = "colorMetric", type = WidgetPropertyType.METRIC, defaultValue = CoreMetrics.VIOLATIONS_DENSITY_KEY,
+  @WidgetProperty(key = "colorMetric", type = WidgetPropertyType.METRIC, defaultValue = CoreMetrics.COVERAGE_KEY,
     options = {WidgetConstants.FILTER_OUT_NEW_METRICS, "type:PERCENT,RATING,LEVEL"}),
   @WidgetProperty(key = "heightInPercents", type = WidgetPropertyType.INTEGER, optional = true, defaultValue = "55")
 })
index 0c28124c4800bcf6077c930c020e331d16998d4f..caa02568abc01471c9c08aad147ae99a37c81530 100644 (file)
@@ -97,7 +97,7 @@ public final class DefaultPages {
 
   @NavigationSection(NavigationSection.RESOURCE_TAB)
   @DefaultTab(
-      metrics = {CoreMetrics.VIOLATIONS_DENSITY_KEY, CoreMetrics.WEIGHTED_VIOLATIONS_KEY, CoreMetrics.VIOLATIONS_KEY, CoreMetrics.BLOCKER_VIOLATIONS_KEY,
+      metrics = {CoreMetrics.WEIGHTED_VIOLATIONS_KEY, CoreMetrics.VIOLATIONS_KEY, CoreMetrics.BLOCKER_VIOLATIONS_KEY,
           CoreMetrics.CRITICAL_VIOLATIONS_KEY, CoreMetrics.MAJOR_VIOLATIONS_KEY, CoreMetrics.MINOR_VIOLATIONS_KEY, CoreMetrics.INFO_VIOLATIONS_KEY,
           CoreMetrics.NEW_VIOLATIONS_KEY, CoreMetrics.NEW_BLOCKER_VIOLATIONS_KEY, CoreMetrics.NEW_CRITICAL_VIOLATIONS_KEY, CoreMetrics.NEW_MAJOR_VIOLATIONS_KEY,
           CoreMetrics.NEW_MINOR_VIOLATIONS_KEY, CoreMetrics.NEW_INFO_VIOLATIONS_KEY,