Skip to content

Commit

Permalink
Allow skipping empty event group levels
Browse files Browse the repository at this point in the history
This minimalistic patch makes sure that any empty event group levels
can be left out of the configuration file instead of requiring an
empty array in that place.
  • Loading branch information
Tadej Borovšak committed Aug 9, 2018
1 parent 4a1ed00 commit db4fd6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/miq_policy_controller/alerts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ def alert_build_pulldowns
@sb[:alert][:events] ||= {}
EmsEvent.event_groups.each do |_k, v|
name = v[:name]
v[:detail].each do |d|
v[:detail]&.each do |d|
@sb[:alert][:events][d] = name + ": " + d if vm_events.include?(d)
end
v[:critical].each do |c|
v[:critical]&.each do |c|
@sb[:alert][:events][c] = name + ": " + c if vm_events.include?(c)
end
end
Expand Down

0 comments on commit db4fd6c

Please sign in to comment.