org.sonar.plugins.buildstability.buildStabilityWidget.erb Maven / Gradle / Ivy
<%
builds_measure = measure('builds')
success_rate_measure = measure('build_success_density')
failed_measure = measure('build_failures')
average_duration_measure = measure('build_average_duration')
longest_duration_measure = measure('build_longest_duration')
shortest_duration_measure = measure('build_shortest_duration')
average_time_to_fix_measure = measure('build_average_time_to_fix_failure')
longest_time_to_fix_measure = measure('build_longest_time_to_fix_failure')
average_builds_to_fix_measure = measure('build_average_builds_to_fix_failure')
durations_measure = measure('build_durations')
results_measure = measure('build_results')
if builds_measure
if builds_measure.typed_value == 0
%>
No recent build found on your CI Server.
<% else %>
Build success
<%= format_measure(success_rate_measure, :suffix => '') %> <%= tendency_icon(success_rate_measure, false) %>
<%= format_measure(builds_measure, :suffix => ' builds') %> <%= tendency_icon(builds_measure) %>
<%= format_measure(failed_measure, :suffix => ' failed') %> <%= tendency_icon(failed_measure) %>
Average duration of successful builds
<%= format_measure(average_duration_measure, :suffix => '') %> <%= tendency_icon(average_duration_measure, false) %>
<%= format_measure(longest_duration_measure, :prefix => 'Longest ') %> <%= tendency_icon(longest_duration_measure) %>
<%= format_measure(shortest_duration_measure, :prefix => 'Shortest ') %> <%= tendency_icon(shortest_duration_measure) %>
Average time to fix a failure
<%= format_measure(average_time_to_fix_measure, :suffix => ' ') %> <%= tendency_icon(average_time_to_fix_measure, false) %>
<%= format_measure(longest_time_to_fix_measure, :prefix => 'Longest ') %> <%= tendency_icon(longest_time_to_fix_measure) %>
<%= format_measure(average_builds_to_fix_measure, :prefix => 'Average number of builds ') %> <%= tendency_icon(average_builds_to_fix_measure) %>
<% if durations_measure && results_measure %>
<%= chart('ck=buildsbar&w=350&h=200&v=' + durations_measure.data + '&c=' + results_measure.data) %>
<% end %>
<% end
end %>