aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/web_interface.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-10 16:09:08 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-10 16:09:08 +0100
commitf1608b8098d0302f7e5c0e7989c78fa310d7d424 (patch)
treef4e1a9a9a5f6c0873bc568c96a21fbade7170104 /lib/mauve/web_interface.rb
parenta54a32084e9870af6f1ede97887c2332c21e812c (diff)
Removed MauveTime. Added more tests.
Diffstat (limited to 'lib/mauve/web_interface.rb')
-rw-r--r--lib/mauve/web_interface.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb
index 805a3e3..bf2c667 100644
--- a/lib/mauve/web_interface.rb
+++ b/lib/mauve/web_interface.rb
@@ -222,7 +222,7 @@ EOF
a.acknowledge!(@person, ack_until)
logger.debug note
unless note.to_s.empty?
- h = History.new(:alert_id => a.id, :type => "note", :event => note.to_s)
+ h = History.new(:alerts => [a], :type => "note", :event => note.to_s)
logger.debug h.errors unless h.save
end
succeeded << a
@@ -455,7 +455,7 @@ EOF
end
def find_recent_alerts
- since = params['since'] ? MauveTime.parse(params['since']) : (MauveTime.now-86400)
+ since = params['since'] ? Time.parse(params['since']) : (Time.now-86400)
@alerts = Alert.all(:updated_at.gt => since, :order => [:raised_at.desc, :cleared_at.desc, :acknowledged_at.desc, :updated_at.desc, ])
end