]> source.dussan.org Git - sonarqube.git/blob
b42c5022a1393c1773a6657f6503aa648f9b7a02
[sonarqube.git] /
1 <%
2   if measure(Metric::LINES) || measure(Metric::NCLOC)
3     public_api=measure('public_api')
4     public_documented_api_density=measure('public_documented_api_density')
5     public_undocumented_api=measure('public_undocumented_api')
6     comment_lines=measure('comment_lines')
7     comment_lines_density=measure('comment_lines_density')
8     comment_blank_lines=measure('comment_blank_lines')
9 %>
10 <table width="100%">
11   <tbody>
12     <tr>
13       <td valign="top" width="50%">
14         <div class="dashbox">
15           <p class="title"><%= message('widget.documentation_comments.documentation') -%></p>
16           <p>
17             <span class="big"><%= format_measure(public_documented_api_density, :url => url_for_drilldown(Metric::PUBLIC_UNDOCUMENTED_API, :highlight => Metric::PUBLIC_DOCUMENTED_API_DENSITY))%></span><%= message('widget.documentation_comments.docu_api.suffix') %>
18             <%= dashboard_configuration.selected_period? ? format_variation('public_documented_api_density') : trend_icon('public_documented_api_density') -%>
19           </p>
20           <p>
21             <%= format_measure(public_api,:url => url_for_drilldown(public_api), :suffix =>  message('widget.documentation_comments.public_api.suffix'))%>
22             <%= dashboard_configuration.selected_period? ? format_variation(public_api) : trend_icon(public_api) -%>
23           </p>
24           <p>
25             <%= format_measure(public_undocumented_api,:url => url_for_drilldown(public_undocumented_api), :suffix => message('widget.documentation_comments.undocu_api.suffix'))%>
26             <%= dashboard_configuration.selected_period? ? format_variation(public_undocumented_api) : trend_icon(public_undocumented_api) -%>
27           </p>
28         </div>
29       </td>
30       <td valign="top" width="50%">
31         <div class="dashbox">
32           <p class="title"><%= message('widget.documentation_comments.comments') -%></p>
33           <p>
34             <span class="big">
35               <%= format_measure(comment_lines_density,:url => url_for_drilldown(comment_lines_density))%>
36             </span>
37             <%= dashboard_configuration.selected_period? ? format_variation(comment_lines_density) : trend_icon(comment_lines_density) -%>
38           </p>
39           <p>
40             <%= format_measure(measure(comment_lines),:url => url_for_drilldown(comment_lines), :suffix =>  message('widget.documentation_comments.lines.suffix'))%>
41             <%= dashboard_configuration.selected_period? ? format_variation(comment_lines) : trend_icon(comment_lines) -%>
42           </p>
43             <%
44             if comment_blank_lines && comment_blank_lines.value>0
45             %>
46             <p>+<%= format_measure(comment_blank_lines, :suffix => message('widget.documentation_comments.blank.suffix'), :url => url_for_drilldown(comment_blank_lines)) %>
47             <%= dashboard_configuration.selected_period? ? format_variation(comment_blank_lines) : trend_icon(comment_blank_lines) -%>
48             </p>
49             <% end %>
50         </div>
51       </td>
52     </tr>
53   </tbody>
54 </table>
55 <%
56   end
57 %>