]> source.dussan.org Git - sonarqube.git/blob
0f884137877d2e7f68e447d9127edc38556dade4
[sonarqube.git] /
1 <%
2   if measure(Metric::LINES) || measure(Metric::NCLOC)
3     comment_lines=measure('comment_lines')
4     comment_lines_density=measure('comment_lines_density')
5     comment_blank_lines=measure('comment_blank_lines')
6     public_documented_api_density=measure('public_documented_api_density')
7     public_undocumented_api=measure('public_undocumented_api')
8     commented_out_lines=measure('commented_out_code_lines')
9     duplicated_lines_density=measure('duplicated_lines_density')
10     duplicated_lines=measure('duplicated_lines')
11     duplicated_blocks=measure('duplicated_blocks')
12     duplicated_files=measure('duplicated_files')
13 %>
14 <table width="100%">
15         <tr>
16                 <td valign="top" width="50%" nowrap>
17                         <% if (comment_lines) %>
18                     <div class="dashbox">
19                       <h3>Comments</h3>
20                       <p>
21                         <span class="big"><%= format_measure(comment_lines_density, :suffix => '', :url => url_for_drilldown(comment_lines_density)) %></span>
22                         <%= dashboard_configuration.variation? ? format_variation(comment_lines_density) : trend_icon(comment_lines_density) -%>
23                       </p>
24                       <p>
25                         <%= format_measure(comment_lines, :suffix => ' lines', :url => url_for_drilldown(comment_lines)) %>
26                         <%= dashboard_configuration.variation? ? format_variation(comment_lines) : trend_icon(comment_lines) -%>
27                       </p>
28                       <%
29                       if comment_blank_lines && comment_blank_lines.value>0
30                       %>
31                       <p>+<%= format_measure(comment_blank_lines, :suffix => ' blank', :url => url_for_drilldown(comment_blank_lines)) %>
32                       <%= dashboard_configuration.variation? ? format_variation(comment_blank_lines) : trend_icon(comment_blank_lines) -%>
33                       </p>
34                       <% end %>
35                       <p>
36                         <%= format_measure(public_documented_api_density, :suffix => ' docu. API', :url => url_for_drilldown(Metric::PUBLIC_UNDOCUMENTED_API, :highlight => Metric::PUBLIC_DOCUMENTED_API_DENSITY)) %>
37                         <%= dashboard_configuration.variation? ? format_variation(public_documented_api_density) : trend_icon(public_documented_api_density) -%>
38                       </p>
39                       <p>
40                         <%= format_measure(public_undocumented_api, :suffix => ' undocu. API', :url => url_for_drilldown(public_undocumented_api)) %>
41                         <%= dashboard_configuration.variation? ? format_variation(public_undocumented_api) : trend_icon(public_undocumented_api) -%>
42                       </p>
43                       <p>
44                         <%= format_measure(commented_out_lines, :suffix => ' commented LOCs', :url => url_for_drilldown(commented_out_lines)) %>
45                         <%= dashboard_configuration.variation? ? format_variation(commented_out_lines) : trend_icon(commented_out_lines) -%>
46                       </p>
47                     </div>
48                     <% end %>
49                 </td>
50                 <td valign="top" width="50%" nowrap>
51                     <% if duplicated_lines_density %>
52                     <div class="dashbox">
53                       <h3>Duplications</h3>
54                       <p>
55                         <span class="big"><%= format_measure(duplicated_lines_density, :suffix => '', :url => url_for_drilldown(Metric::DUPLICATED_LINES, :highlight =>  'duplicated_lines_density')) %></span>
56                         <%= dashboard_configuration.variation? ? format_variation(duplicated_lines_density) : trend_icon(duplicated_lines_density) -%>
57                       </p>
58                       <p>
59                         <%= format_measure(duplicated_lines, :suffix => ' lines', :url => url_for_drilldown(duplicated_lines)) %>
60                         <%= dashboard_configuration.variation? ? format_variation(duplicated_lines) : trend_icon(duplicated_lines) -%>
61                       </p>
62                       <p>
63                         <%= format_measure(duplicated_blocks, :suffix => ' blocks', :url => url_for_drilldown(duplicated_blocks)) %>
64                         <%= dashboard_configuration.variation? ? format_variation(duplicated_blocks) : trend_icon(duplicated_blocks) -%>
65                       </p>
66                       <p>
67                         <%= format_measure(duplicated_files, :suffix => ' files', :url => url_for_drilldown(duplicated_files)) %>
68                         <%= dashboard_configuration.variation? ? format_variation(duplicated_files) : trend_icon(duplicated_files) -%>
69                       </p>
70                     </div>
71                     <% end %>
72                 </td>
73         </tr>
74 </table>
75 <% end %>