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