From 1ac431fa21907a2a95d87901825cff3dc462746b Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 8 Jul 2011 17:24:08 +0100 Subject: Added first basic history functionality, and rejigged when notify is called for an alert. --- lib/mauve/notifiers/templates/email.html.erb | 6 +++--- lib/mauve/notifiers/templates/email.txt.erb | 6 +++--- lib/mauve/notifiers/templates/xmpp.txt.erb | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/mauve/notifiers/templates') diff --git a/lib/mauve/notifiers/templates/email.html.erb b/lib/mauve/notifiers/templates/email.html.erb index ab65b48..bf5aed5 100644 --- a/lib/mauve/notifiers/templates/email.html.erb +++ b/lib/mauve/notifiers/templates/email.html.erb @@ -2,10 +2,10 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%= alert.update_type.upcase %>: <% -case alert.update_type.to_sym -when :cleared +case alert.update_type +when "cleared" %><%= alert.cleared_at.to_s_relative %><% -when :acknowledged +when "acknowledged" %><%= alert.acknowledged_at.to_s_relative %> by <%= alert.acknowledged_by%><% else %><%= alert.raised_at.to_s_relative %><% diff --git a/lib/mauve/notifiers/templates/email.txt.erb b/lib/mauve/notifiers/templates/email.txt.erb index 57b9309..d112718 100644 --- a/lib/mauve/notifiers/templates/email.txt.erb +++ b/lib/mauve/notifiers/templates/email.txt.erb @@ -1,8 +1,8 @@ <%= alert.update_type.upcase %>: <% -case alert.update_type.to_sym -when :cleared +case alert.update_type +when "cleared" %><%= alert.cleared_at.to_s_relative %><% -when :acknowledged +when "acknowledged" %><%= alert.acknowledged_at.to_s_relative %> by <%= alert.acknowledged_by %><% else %><%= alert.raised_at.to_s_relative %><% diff --git a/lib/mauve/notifiers/templates/xmpp.txt.erb b/lib/mauve/notifiers/templates/xmpp.txt.erb index 331d7ef..2f86cb6 100644 --- a/lib/mauve/notifiers/templates/xmpp.txt.erb +++ b/lib/mauve/notifiers/templates/xmpp.txt.erb @@ -1,8 +1,8 @@ <%= alert.update_type.upcase %>: <% -case alert.update_type.to_sym -when :cleared +case alert.update_type +when "cleared" %><%= alert.cleared_at.to_s_relative %><% -when :acknowledged +when "acknowledged" %><%= alert.acknowledged_at.to_s_relative %> by <%= alert.acknowledged_by %><% else %><%= alert.raised_at.to_s_relative %><% -- cgit v1.2.1