From: Julien Lancelot Date: Mon, 14 Apr 2014 08:09:49 +0000 (+0200) Subject: SONAR-3113 Remove 'reverseColor' parameter as the metric direction is used to know... X-Git-Tag: 4.3~40 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3528f2ab23699dee6bf4e1ef83ee9ca54b310d18;p=sonarqube.git SONAR-3113 Remove 'reverseColor' parameter as the metric direction is used to know the direction to use --- diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ProjectFileCloudWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ProjectFileCloudWidget.java index 5a36eb4d5b9..f712e68b0a1 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ProjectFileCloudWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ProjectFileCloudWidget.java @@ -29,9 +29,7 @@ import org.sonar.api.web.WidgetPropertyType; @WidgetProperty(key = "chartTitle", type = WidgetPropertyType.STRING), @WidgetProperty(key = "colorMetric", type = WidgetPropertyType.METRIC, defaultValue = CoreMetrics.COVERAGE_KEY, options = "type:PERCENT"), @WidgetProperty(key = "sizeMetric", type = WidgetPropertyType.METRIC, defaultValue = CoreMetrics.COMPLEXITY_KEY, options = {WidgetConstants.FILTER_OUT_NEW_METRICS}), - @WidgetProperty(key = "maxItems", type = WidgetPropertyType.INTEGER, defaultValue = "100"), - @WidgetProperty(key = "reverseColor", type = WidgetPropertyType.BOOLEAN, defaultValue = "false") - + @WidgetProperty(key = "maxItems", type = WidgetPropertyType.INTEGER, defaultValue = "100") }) public class ProjectFileCloudWidget extends CoreWidget { public ProjectFileCloudWidget() { diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 6560a26219e..1ac5d3db494 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -1163,7 +1163,6 @@ widget.project_file_cloud.property.colorMetric.name=Color Metric widget.project_file_cloud.property.sizeMetric.name=Size Metric widget.project_file_cloud.property.maxItems.name=Max components widget.project_file_cloud.property.maxItems.desc=Maximum number of components to show -widget.project_file_cloud.property.reverseColor.name=Reverse Order on Color widget.time_machine.name=History Table widget.time_machine.description=Displays up to 10 metrics in a table, showing their value for a specified number of past snapshots. diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/project_file_cloud.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/project_file_cloud.html.erb index 68c152a6f51..74d6b4a8cee 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/project_file_cloud.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/project_file_cloud.html.erb @@ -4,7 +4,6 @@ sizeMetric = widget_properties['sizeMetric'] chartTitle = widget_properties['chartTitle'] maxItems = widget_properties['maxItems'].to_i - reverseColor = widget_properties['reverseColor'] %>
@@ -64,8 +63,7 @@ .metricsPriority(['<%= colorMetric.name -%>', '<%= sizeMetric.name -%>']) .components(data.components) .options({ - baseUrl: baseUrl + '/dashboard/index/', - reverseColor: <%= reverseColor -%> + baseUrl: baseUrl + '/dashboard/index/' }) .render('#<%= containerId -%>');