<div id="coverage_header" class="tab_header">
- <table class="col">
+ <table class="metrics">
<tr>
- <td class="big"><%= format_measure('coverage', :default => '-') -%></td>
+ <td class="big" rowspan="2"><%= format_measure('coverage', :default => '-') -%></td>
+ <td class="sep"> </td>
+ <%= render :partial => 'measure', :locals => {:measure => measure('line_coverage'), :title => 'Line coverage'} -%>
+
+ <td class="sep"> </td>
+ <%= render :partial => 'measure', :locals => {:measure => measure('branch_coverage'), :title => 'Branch coverage'} -%>
+ </tr>
+ <tr>
+ <td class="sep"> </td>
+ <%= render :partial => 'measure', :locals => {:measure => measure('uncovered_lines'), :title => 'Uncovered lines', :ratio => measure('lines_to_cover')} -%>
+ <td class="sep"> </td>
+ <%= render :partial => 'measure', :locals => {:measure => measure('uncovered_conditions'), :title => 'Uncovered conditions', :ratio => measure('conditions_to_cover')} -%>
</tr>
- </table>
- <table class="col">
- <% if m=measure('line_coverage') %>
- <tr>
- <td class="name">Line coverage:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('uncovered_lines') %>
+ <% if @period && measure('new_coverage')
+ new_uncovered_lines=measure('new_uncovered_lines')
+ %>
<tr>
- <td class="name">Uncovered lines:</td>
- <td class="value"><%= format_measure(m) -%> / <%= format_measure('lines_to_cover') -%></td>
+ <td colspan="7"><br/>On new/changed code: </td>
</tr>
- <% end %>
- </table>
- <table class="col">
- <% if m=measure('branch_coverage') %>
<tr>
- <td class="name">Branch coverage:</td>
- <td class="value"><%= format_measure(m) -%></td>
+ <td class="big" rowspan="2"><%= format_variation('new_coverage', :period => @period, :style => 'none') -%></td>
+
+ <td class="sep"> </td>
+
+ <% if m=measure('new_line_coverage') %>
+ <td class="name">Line coverage:</td>
+ <td class="value"><%= format_variation(m, :period => @period, :style => 'none') -%></td>
+ <% else %>
+ <td colspan="2"></td>
+ <% end %>
+
+ <td class="sep"> </td>
+ <% if m=measure('new_branch_coverage') %>
+ <td class="name">Branch coverage:</td>
+ <td class="value"><%= format_variation(m, :period => @period, :style => 'none') -%></td>
+ <% else %>
+ <td colspan="2"></td>
+ <% end %>
</tr>
- <% end %>
- <% if m=measure('uncovered_conditions') %>
<tr>
- <td class="name">Uncovered conditions:</td>
- <td class="value"><%= format_measure(m) -%> / <%= format_measure('conditions_to_cover') -%></td>
+ <td class="sep"> </td>
+
+ <% if new_uncovered_lines %>
+ <td class="name">Uncovered lines:</td>
+ <td class="value"><%= format_variation(new_uncovered_lines, :period => @period, :style => 'none') -%>/<%= format_variation('new_lines_to_cover', :period => @period, :style => 'none') -%></td>
+ <% else %>
+ <td colspan="2"></td>
+ <% end %>
+
+ <td class="sep"> </td>
+ <% if m=measure('new_uncovered_conditions') %>
+ <td class="name">Uncovered conditions: </td>
+ <td class="value"><%= format_variation(m, :period => @period, :style => 'none') -%>/<%= format_variation('new_conditions_to_cover', :period => @period, :style => 'none') -%></td>
+ <% else %>
+ <td colspan="2"></td>
+ <% end %>
</tr>
<% end %>
</table>
<div id="source_header" class="tab_header">
- <table class="col">
- <% if m=measure('lines') %>
- <tr>
- <td class="name">Lines:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('ncloc') %>
- <tr>
- <td class="name">Lines of code:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('functions') %>
- <tr>
- <td class="name">Methods:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('accessors') %>
- <tr>
- <td class="name">Accessors:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('paragraphs') %>
- <tr>
- <td class="name">Paragraphs:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
+ <table width="100%">
+ <tr>
+ <td class="col">
+ <table class="metrics">
+ <% if m=measure('lines') %>
+ <tr>
+ <td class="name">Lines:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('ncloc') %>
+ <tr>
+ <td class="name">Lines of code:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('functions') %>
+ <tr>
+ <td class="name">Methods:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('accessors') %>
+ <tr>
+ <td class="name">Accessors:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('paragraphs') %>
+ <tr>
+ <td class="name">Paragraphs:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ </table>
+ </td>
+ <td class="col">
+ <table class="metrics">
+ <% if m=measure('statements') %>
+ <tr>
+ <td class="name">Statements:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('complexity') %>
+ <tr>
+ <td class="name">Complexity:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('function_complexity') %>
+ <tr>
+ <td class="name">Complexity/method:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('paragraph_complexity') %>
+ <tr>
+ <td class="name">Complexity/paragraph:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ </table>
+ </td>
+ <td class="col">
+ <table class="metrics">
+ <% if m=measure('comment_lines_density') %>
+ <tr>
+ <td class="name">Comments:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('comment_lines') %>
+ <tr>
+ <td class="name">Comment lines:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('commented_out_code_lines') %>
+ <tr>
+ <td class="name">Commented-out LOC:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('comment_blank_lines') %>
+ <tr>
+ <td class="name">Blank comments:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ </table>
+ </td>
+ <td class="col">
+ <table class="metrics">
+ <% if m=measure('public_documented_api_density') %>
+ <tr>
+ <td class="name">Public documented API:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('public_undocumented_api') %>
+ <tr>
+ <td class="name">Public undocumented API:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('public_api') %>
+ <tr>
+ <td class="name">Public API:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ </table>
+ </td>
+ <td class="col">
+ <table class="metrics">
+ <% if m=measure('classes') %>
+ <tr>
+ <td class="name">Classes:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('noc') %>
+ <tr>
+ <td class="name">Number of Children:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('dit') %>
+ <tr>
+ <td class="name">Depth in Tree:</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ <% if m=measure('rfc') %>
+ <tr>
+ <td class="name">Response for Class (RFC):</td>
+ <td class="value"><%= format_measure(m) -%></td>
+ </tr>
+ <% end %>
+ </table>
+ </td>
+ </tr>
</table>
-
- <table class="col">
- <% if m=measure('statements') %>
- <tr>
- <td class="name">Statements:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('complexity') %>
- <tr>
- <td class="name">Complexity:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('function_complexity') %>
- <tr>
- <td class="name">Complexity/method:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('paragraph_complexity') %>
- <tr>
- <td class="name">Complexity/paragraph:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
- <table class="col">
- <% if m=measure('comment_lines_density') %>
- <tr>
- <td class="name">Comments:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('comment_lines') %>
- <tr>
- <td class="name">Comment lines:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('commented_out_code_lines') %>
- <tr>
- <td class="name">Commented-out LOC:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('comment_blank_lines') %>
- <tr>
- <td class="name">Blank comments:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
- <table class="col">
- <% if m=measure('public_documented_api_density') %>
- <tr>
- <td class="name">Public documented API:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('public_undocumented_api') %>
- <tr>
- <td class="name">Public undocumented API:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('public_api') %>
- <tr>
- <td class="name">Public API:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
- <table class="col">
- <% if m=measure('classes') %>
- <tr>
- <td class="name">Classes:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('noc') %>
- <tr>
- <td class="name">Number of Children:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('dit') %>
- <tr>
- <td class="name">Depth in Tree:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('rfc') %>
- <tr>
- <td class="name">Response for Class (RFC):</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
<%= render :partial => 'options' -%>
</div>