]> source.dussan.org Git - sonarqube.git/blob
8fae498e7ff7e1c61445977c4bedcf4664455ae3
[sonarqube.git] /
1 <%
2   coverage_measure=measure('merged_coverage')
3   if coverage_measure
4 %>
5 <table width="100%">
6   <tr>
7     <td nowrap valign="top">
8       <div class="dashbox">
9         <p class="title"><%= message('widget.merged-coverage.name') -%></p>
10         <p>
11           <span class="big"><%= format_measure(coverage_measure, :suffix => '', :url => url_for_drilldown('merged_coverage'), :default => '-') %></span>
12           <%= dashboard_configuration.selected_period? ? format_variation(coverage_measure) : trend_icon(coverage_measure) -%>
13         </p>
14         <% it_line_coverage=measure('merged_line_coverage')
15           if it_line_coverage %>
16           <p>
17             <%= format_measure(it_line_coverage, :suffix => message('widget.merged-coverage.line_coverage.suffix'), :url => url_for_drilldown('merged_uncovered_lines', :highlight =>  'merged_line_coverage')) %>
18             <%= dashboard_configuration.selected_period? ? format_variation(it_line_coverage) : trend_icon(it_line_coverage) -%>
19           </p>
20         <% end %>
21         <% it_branch_coverage=measure('merged_branch_coverage')
22           if it_branch_coverage %>
23           <p>
24             <%= format_measure(it_branch_coverage, :suffix => message('widget.merged-coverage.branch_coverage.suffix'), :url => url_for_drilldown('merged_uncovered_conditions', :highlight =>  'merged_branch_coverage')) %>
25             <%= dashboard_configuration.selected_period? ? format_variation(it_branch_coverage) : trend_icon(it_branch_coverage) -%>
26           </p>
27         <% end %>
28       </div>
29     </td>
30     <td nowrap valign="top">
31       <div class="dashbox">
32     <%
33         if dashboard_configuration.selected_period?
34           new_lines_to_cover_measure=measure('new_merged_lines_to_cover')
35           if new_lines_to_cover_measure
36             new_lines=new_lines_to_cover_measure.variation(dashboard_configuration.period_index)
37             if new_lines
38               new_coverage=measure('new_merged_coverage')
39               new_line_coverage=measure('new_merged_line_coverage')
40               new_branch_coverage=measure('new_merged_branch_coverage')
41         %>
42             <h3><%= message('widget.merged-coverage.on_new_code') -%>: </h3>
43             <% if new_lines.to_i==0 %>
44               <p><%= message('widget.merged-coverage.no_new_lines_to_cover') -%></p>
45             <% else %>
46               <% if new_coverage %>
47                 <p>
48                   <span class="big">
49                     <a href="<%= url_for_drilldown('new_merged_coverage', :period => dashboard_configuration.period_index) -%>"><%= format_variation(new_coverage, :style => 'none', :default => '-') -%></a>
50                   </span>
51                 </p>
52               <% end %>
53               <p>
54                 <a href="<%= url_for_drilldown('new_merged_lines_to_cover', :period => dashboard_configuration.period_index) -%>"><%= format_variation(new_lines_to_cover_measure, :style => 'none', :default => '-') -%><%= message('widget.merged-coverage.lines_to_cover.suffix') -%></a>
55               </p>
56               <% if new_line_coverage %>
57                 <p>
58                   <a href="<%= url_for_drilldown('new_merged_uncovered_lines', :highlight => 'new_merged_line_coverage', :period => dashboard_configuration.period_index) -%>"><%= format_variation(new_line_coverage, :style => 'none', :default => '-') -%><%= message('widget.merged-coverage.line_coverage.suffix') -%></a>
59                 </p>
60               <% end %>
61               <% if new_branch_coverage %>
62                 <p>
63                   <a href="<%= url_for_drilldown('new_merged_uncovered_conditions', :highlight => 'new_merged_branch_coverage', :period => dashboard_configuration.period_index) -%>"><%= format_variation(new_branch_coverage, :style => 'none', :default => '-') -%><%= message('widget.merged-coverage.branch_coverage.suffix') -%></a>
64                 </p>
65               <%
66                  end
67                end
68             end
69           end
70         end
71         %>
72         </div>
73     </td>
74 </tr>
75 </table>
76 <% end %>