Skip to content

Commit

Permalink
Show total failures count
Browse files Browse the repository at this point in the history
The top-level stats now includes a total failures count, so let's use
it.
  • Loading branch information
natemccurdy committed Feb 13, 2017
1 parent 50a42a8 commit 0fb8a81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions preview_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,7 @@ def header4(title)
header1 'Catalog Compliation Failures'
div.failure_overview! do
# 0 out X summary
# Top level failures key does not show baseline failure or percentage
failures = baseline['compilation_errors'].map { |h| h['nodes'] }.flatten.size if total_failures.zero?
failures = stats['failures']['total']
percent = stats['failures']['percent'] || (failures.to_f / stats['node_count'].to_f) * 100.0
<<-eos
#{tag! :strong, failures} out of #{stats['node_count']} nodes failed to compile their catalog.
Expand Down

0 comments on commit 0fb8a81

Please sign in to comment.