From 9f4910bef307cb9c0c78c4e45710956f3521774c Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 21 Nov 2012 11:56:24 +0000 Subject: Updated alert queries to be more precise. --- lib/mauve/alert.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') 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. -- cgit v1.2.1