debian-mirror-gitlab/lib/gitlab/performance_bar/with_top_level_warnings.rb
2019-12-04 20:38:33 +05:30

20 lines
366 B
Ruby

# frozen_string_literal: true
module Gitlab
module PerformanceBar
module WithTopLevelWarnings
def results
results = super
results.merge(has_warnings: has_warnings?(results))
end
def has_warnings?(results)
results[:data].any? do |_, value|
value[:warnings].present?
end
end
end
end
end