From c36f2e731414c844661c7d39d4958f05e4b1d1c0 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 21 Nov 2014 14:48:40 +0100 Subject: [PATCH] SONAR-5544 Make the Complexity widget comply with the new SonarQube widget Look and Feel --- .../plugins/core/widgets/complexity.html.erb | 50 ++++++++++--------- .../resources/org/sonar/l10n/core.properties | 1 - 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb index b37a7ce3821..6a24a955965 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb @@ -10,40 +10,42 @@
-
- <%= message('widget.complexity.name') -%> - <% if function_complexity %> + <% if complexity %> +

+ <%= message('metric.complexity.name') %> + + <%= format_measure(complexity, :url => url_for_drilldown(complexity)) %> + <%= dashboard_configuration.selected_period? ? format_variation(complexity) : trend_icon(complexity) -%> + +

+ <% end %> + <% if function_complexity %> +

+ <%= message('widget.complexity.per_method.suffix') %> <%= format_measure(function_complexity, :url => url_for_drilldown(function_complexity)) %> <%= dashboard_configuration.selected_period? ? format_variation(function_complexity) : trend_icon(function_complexity) -%> - <%= message('widget.complexity.per_method.suffix') %> - <% end %> - <% if class_complexity %> -
+

+ <% end %> + <% if class_complexity %> +

+ <%= message('widget.complexity.per_class.suffix') %> <%= format_measure(class_complexity, :url => url_for_drilldown(class_complexity)) %> - <%= dashboard_configuration.selected_period? ? format_variation(class_complexity) : trend_icon(class_complexity) -%> - <%= message('widget.complexity.per_class.suffix') %> + <%= dashboard_configuration.selected_period? ? format_variation(class_complexity) : trend_icon(class_complexity) -%> - <% end %> - <% if file_complexity %> -
+

+ <% end %> + <% if file_complexity %> +

+ <%= message('widget.complexity.per_file.suffix') %> <%= format_measure(file_complexity, :url => url_for_drilldown(file_complexity)) %> - <%= dashboard_configuration.selected_period? ? format_variation(file_complexity) : trend_icon(file_complexity) -%> - <%= message('widget.complexity.per_file.suffix') %> + <%= dashboard_configuration.selected_period? ? format_variation(file_complexity) : trend_icon(file_complexity) -%> - <% end %> - <% if complexity %> -
- - <%= message('widget.complexity.total') -%> - : <%= format_measure(complexity, :url => url_for_drilldown(complexity)) %> - <%= dashboard_configuration.selected_period? ? format_variation(complexity) : trend_icon(complexity) -%> - - <% end %> -

+

+ <% end %>
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index b4adf371377..32c52343264 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1084,7 +1084,6 @@ widget.complexity.description=Reports on complexity, average complexity and comp widget.complexity.per_method.suffix=\ /function widget.complexity.per_class.suffix=\ /class widget.complexity.per_file.suffix=\ /file -widget.complexity.total=Total widget.custom_measures.name=Custom Measures widget.custom_measures.description=Displays a list of selected measures. -- 2.39.5