From: Julien Lancelot Date: Tue, 17 Dec 2013 10:45:53 +0000 (+0100) Subject: SONAR-3113 Add maxItems param X-Git-Tag: 4.2~940 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=15840de6781ce67c5acc948f4b45a67d842f742d;p=sonarqube.git SONAR-3113 Add maxItems param --- diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CloudWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CloudWidget.java index 5869e9434c5..ed94fe60d64 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CloudWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CloudWidget.java @@ -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 { diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/cloud.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/cloud.html.erb index 8d23d58102c..d1dc4f8b173 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/cloud.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/cloud.html.erb @@ -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 %>;