diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-21 11:56:24 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-21 11:56:24 +0000 |
commit | 9f4910bef307cb9c0c78c4e45710956f3521774c (patch) | |
tree | 2a1bcf7aede27ed31e3390470c0e46f2916fff89 /lib/mauve | |
parent | 115c4e1d31d5f0e7dcf135c1e731598c0179246b (diff) |
Updated alert queries to be more precise.
Diffstat (limited to 'lib/mauve')
-rw-r--r-- | lib/mauve/alert.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb index 055ada2..52c098c 100644 --- a/lib/mauve/alert.rb +++ b/lib/mauve/alert.rb @@ -698,21 +698,21 @@ module Mauve # # @return [Array] def all_unacknowledged - all_raised - all_acknowledged + all_raised & all(:acknowldeged_at => nil) end - # All alerts currently acknowledged + # All alerts currently raised and acknowledged # # @return [Array] def all_acknowledged - all(:acknowledged_at.not => nil) + all_raised & all(:acknowledged_at.not => nil) end # All alerts currently cleared # # @return [Array] def all_cleared - all - all_raised - all_acknowledged + all - all_raised end # Returns a hash of all the :urgent, :normal and :low alerts. |