]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3113 Add maxItems param
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 17 Dec 2013 10:45:53 +0000 (11:45 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 17 Dec 2013 10:45:53 +0000 (11:45 +0100)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CloudWidget.java
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/cloud.html.erb

index 5869e9434c5adff8454f28eb11ae7a1f46cf22af..ed94fe60d64b9230f7c2c3155fc2ae959a5540d7 100644 (file)
@@ -31,7 +31,8 @@ import static org.sonar.api.web.WidgetScope.GLOBAL;
   @WidgetProperty(key = "chartHeight", type = WidgetPropertyType.INTEGER, defaultValue = "300"),
   @WidgetProperty(key = "filter", type = WidgetPropertyType.FILTER, optional = false),
   @WidgetProperty(key = "colorMetric", type = WidgetPropertyType.METRIC, defaultValue = CoreMetrics.TECHNICAL_DEBT_KEY, options = {WidgetConstants.FILTER_OUT_NEW_METRICS}),
-  @WidgetProperty(key = "sizeMetric", type = WidgetPropertyType.METRIC, defaultValue = CoreMetrics.COMPLEXITY_KEY, options = {WidgetConstants.FILTER_OUT_NEW_METRICS})
+  @WidgetProperty(key = "sizeMetric", type = WidgetPropertyType.METRIC, defaultValue = CoreMetrics.COMPLEXITY_KEY, options = {WidgetConstants.FILTER_OUT_NEW_METRICS}),
+  @WidgetProperty(key = "maxItems", type = WidgetPropertyType.INTEGER, defaultValue = "50")
 })
 public class CloudWidget extends CoreWidget {
 
index 8d23d58102c6afd93b8891eb90be6ce947139b5b..d1dc4f8b17349dfbcf638e49c6b21e64e7439b6e 100644 (file)
@@ -4,6 +4,7 @@
   var chartHeight = <%= widget_properties['chartHeight'].to_i %>;
   var colorMetric = <%= widget_properties['colorMetric'].key.to_s %>;
   var sizeMetric = <%= widget_properties['sizeMetric'].key.to_s %>;
+  var maxItems = <%= widget_properties['maxItems'].to_i %>;
 </script>