From: simonbrandhof Date: Wed, 16 Mar 2011 17:53:23 +0000 (+0100) Subject: Improve new coverage widget X-Git-Tag: 2.7~32 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=78cc08630e2afbaaf221abe127411830360ed4f9;p=sonarqube.git Improve new coverage widget --- diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb index 3e165313f01..c1aaf0efac9 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb @@ -40,11 +40,13 @@ new_line_coverage=measure('new_line_coverage') new_branch_coverage=measure('new_branch_coverage') %>
-

On new code:

- <% if new_lines.to_i>0 %> +

On new code:

+ <% if new_lines.to_i==0 %> +

No new lines to cover

+ <% else %> <% if new_coverage %>

- <%= new_coverage.format_numeric_value(variation_value(new_coverage))||'-' -%> coverage + <%= new_coverage.format_numeric_value(variation_value(new_coverage))||'-' -%>

<% end %>