]> source.dussan.org Git - sonarqube.git/commitdiff
Improve new coverage widget
authorsimonbrandhof <simon.brandhof@gmail.com>
Wed, 16 Mar 2011 17:53:23 +0000 (18:53 +0100)
committersimonbrandhof <simon.brandhof@gmail.com>
Wed, 16 Mar 2011 17:53:23 +0000 (18:53 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb

index 3e165313f0198c1b33279ed7bea0bbe751ebe39d..c1aaf0efac96a10d9e27d5054bf5f0b2d304b14f 100644 (file)
               new_line_coverage=measure('new_line_coverage')
               new_branch_coverage=measure('new_branch_coverage')
         %>  <br/>
-            <h3>On new code:</h3>
-            <% if new_lines.to_i>0 %>
+            <h3>On new code: </h3>
+            <% if new_lines.to_i==0 %>
+              <p>No new lines to cover</p>
+            <% else %>
               <% if new_coverage %>
                 <p>
-                  <span class="big"><a href="<%= url_for_drilldown('new_coverage', :period => dashboard_configuration.period_index) -%>"><%= new_coverage.format_numeric_value(variation_value(new_coverage))||'-' -%></a></span> coverage
+                  <span class="big"><a href="<%= url_for_drilldown('new_coverage', :period => dashboard_configuration.period_index) -%>"><%= new_coverage.format_numeric_value(variation_value(new_coverage))||'-' -%></a></span>
                 </p>
               <% end %>
               <p>