From: Evgeny Mandrikov Date: Mon, 19 Mar 2012 05:36:05 +0000 (+0400) Subject: Reformat code for some core widgets X-Git-Tag: 3.0~176 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2b75a64a9cc33875ec2ebc4384469e9b3af50b5d;p=sonarqube.git Reformat code for some core widgets * Replace tabs by spaces * Align blocks --- 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 a40542f0852..3eb807b0847 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 @@ -1,4 +1,3 @@ - <% file_complexity=measure('file_complexity') function_complexity=measure('function_complexity') @@ -117,4 +116,3 @@ if file_distribution
<% end %> - diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb index d661b295560..49cc103ff9a 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb @@ -7,8 +7,8 @@ if code_coverage_measure || tests_measure %> - - +
+

<%= message('widget.code_coverage.name') -%>

diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb index 050cb2d8e98..f039205bc53 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb @@ -3,8 +3,8 @@ if coverage_measure %> - - +
+

<%= message('widget.it-coverage.name') -%>

@@ -74,5 +74,3 @@

<% end %> - - diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb index 4c2f9d1fda8..e6366b32bc8 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb @@ -10,69 +10,70 @@ statements=measure('statements') %> - - + - - - +

<%= format_measure(lines, :suffix => message('widget.size.lines.suffix'), :url => url_for_drilldown(lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(lines) : trend_icon(lines) -%>

+ <% else%> +

<%= format_measure(lines, :suffix => '', :url => url_for_drilldown(lines)) -%> <%= trend_icon(lines) -%>

+ <% end %> + <% + generated_lines=measure('generated_lines') + if generated_lines && generated_lines.value>0 + %> +

incl. <%= format_measure(generated_lines, :suffix => message('widget.size.generated.suffix'), :url => url_for_drilldown(generated_lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_lines) : trend_icon(generated_lines) -%>

+ <% end %> + <% if statements %> +

+ <%= format_measure(statements, :suffix => message('widget.size.statements.suffix'), :url => url_for_drilldown(statements)) -%> <%= dashboard_configuration.selected_period? ? format_variation(statements) : trend_icon(statements) -%> +

+ <% end %> + <% if files && measure('classes') %> +

<%= format_measure(files, :suffix => message('widget.size.files.suffix'), :url => url_for_drilldown(files)) -%> <%= dashboard_configuration.selected_period? ? format_variation(files) : trend_icon(files) -%>

+ <% end %> + + + + +
-
-

<%= message('widget.size.lines_of_code') -%>

- <% if ncloc %> -

- <%= format_measure(ncloc, :suffix => '', :url => url_for_drilldown(ncloc)) -%> - <%= dashboard_configuration.selected_period? ? format_variation(ncloc) : trend_icon(ncloc) -%> -

- <% - generated_ncloc=measure('generated_ncloc') - if generated_ncloc && generated_ncloc.value>0 - %> -

+<%= format_measure(generated_ncloc, :suffix => message('widget.size.generated.suffix'), :url => url_for_drilldown(generated_ncloc)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_ncloc) : trend_icon(generated_ncloc) -%>

- <% end %> -

<%= format_measure(lines, :suffix => message('widget.size.lines.suffix'), :url => url_for_drilldown(lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(lines) : trend_icon(lines) -%>

- <% else%> -

<%= format_measure(lines, :suffix => '', :url => url_for_drilldown(lines)) -%> <%= trend_icon(lines) -%>

- <% end %> - <% - generated_lines=measure('generated_lines') - if generated_lines && generated_lines.value>0 - %> -

incl. <%= format_measure(generated_lines, :suffix => message('widget.size.generated.suffix'), :url => url_for_drilldown(generated_lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_lines) : trend_icon(generated_lines) -%>

- <% end %> - <% if statements %> +
+
+

<%= message('widget.size.lines_of_code') -%>

+ <% if ncloc %>

- <%= format_measure(statements, :suffix => message('widget.size.statements.suffix'), :url => url_for_drilldown(statements)) -%> <%= dashboard_configuration.selected_period? ? format_variation(statements) : trend_icon(statements) -%> + <%= format_measure(ncloc, :suffix => '', :url => url_for_drilldown(ncloc)) -%> + <%= dashboard_configuration.selected_period? ? format_variation(ncloc) : trend_icon(ncloc) -%>

+ <% + generated_ncloc=measure('generated_ncloc') + if generated_ncloc && generated_ncloc.value>0 + %> +

+<%= format_measure(generated_ncloc, :suffix => message('widget.size.generated.suffix'), :url => url_for_drilldown(generated_ncloc)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_ncloc) : trend_icon(generated_ncloc) -%>

<% end %> - <% if files && measure('classes') %> -

<%= format_measure(files, :suffix => message('widget.size.files.suffix'), :url => url_for_drilldown(files)) -%> <%= dashboard_configuration.selected_period? ? format_variation(files) : trend_icon(files) -%>

- <% end %> -
-
-
- <% if classes %> -

<%= message('widget.size.classes') -%>

-

- <%= format_measure(classes, :url => url_for_drilldown(classes)) -%> - <%= dashboard_configuration.selected_period? ? format_variation(classes) : trend_icon(classes) -%> -

-

<%= format_measure(packages, :suffix => message('widget.size.packages.suffix'), :url => url_for_drilldown(packages)) -%> <%= dashboard_configuration.selected_period? ? format_variation(packages) : trend_icon(packages) -%>

- <% else %> -

<%= message('widget.size.files') -%>

-

<%= format_measure(files, :url => url_for_drilldown(files)) -%> - <%= dashboard_configuration.selected_period? ? format_variation(files) : trend_icon(files) -%> -

-

<%= format_measure('directories', :suffix => message('widget.size.directories.suffix'), :url => url_for_drilldown('directories')) -%> <%= dashboard_configuration.selected_period? ? format_variation('directories') : trend_icon('directories') -%>

- <% end %> -

<%= format_measure(functions, :suffix => message('widget.size.methods.suffix'), :url => url_for_drilldown(functions)) -%> <%= dashboard_configuration.selected_period? ? format_variation(functions) : trend_icon(functions) -%>

- <% - if (measure('accessors')) - %> -

<%= format_measure('accessors', :suffix => message('widget.size.accessors.suffix'), :url => url_for_drilldown('accessors')) -%> <%= dashboard_configuration.selected_period? ? format_variation('accessors') : trend_icon('accessors') -%>

- <% end %> - <% if measure('paragraphs') %> -

<%= format_measure('paragraphs', :suffix => message('widget.size.paragraphs.suffix'), :url => url_for_drilldown('paragraphs')) -%> <%= dashboard_configuration.selected_period? ? format_variation('paragraphs') : trend_icon('paragraphs') -%>

- <% end %> -
-
+
+ <% if classes %> +

<%= message('widget.size.classes') -%>

+

+ <%= format_measure(classes, :url => url_for_drilldown(classes)) -%> + <%= dashboard_configuration.selected_period? ? format_variation(classes) : trend_icon(classes) -%> +

+

<%= format_measure(packages, :suffix => message('widget.size.packages.suffix'), :url => url_for_drilldown(packages)) -%> <%= dashboard_configuration.selected_period? ? format_variation(packages) : trend_icon(packages) -%>

+ <% else %> +

<%= message('widget.size.files') -%>

+

+ <%= format_measure(files, :url => url_for_drilldown(files)) -%> + <%= dashboard_configuration.selected_period? ? format_variation(files) : trend_icon(files) -%> +

+

<%= format_measure('directories', :suffix => message('widget.size.directories.suffix'), :url => url_for_drilldown('directories')) -%> <%= dashboard_configuration.selected_period? ? format_variation('directories') : trend_icon('directories') -%>

+ <% end %> +

<%= format_measure(functions, :suffix => message('widget.size.methods.suffix'), :url => url_for_drilldown(functions)) -%> <%= dashboard_configuration.selected_period? ? format_variation(functions) : trend_icon(functions) -%>

+ <% + if (measure('accessors')) + %> +

<%= format_measure('accessors', :suffix => message('widget.size.accessors.suffix'), :url => url_for_drilldown('accessors')) -%> <%= dashboard_configuration.selected_period? ? format_variation('accessors') : trend_icon('accessors') -%>

+ <% end %> + <% if measure('paragraphs') %> +

<%= format_measure('paragraphs', :suffix => message('widget.size.paragraphs.suffix'), :url => url_for_drilldown('paragraphs')) -%> <%= dashboard_configuration.selected_period? ? format_variation('paragraphs') : trend_icon('paragraphs') -%>

+ <% end %> +
+
<% end %> \ No newline at end of file