diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-06-16 18:23:52 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-06-16 18:23:52 +0100 |
commit | f6d9144af81f2078567691614fa7831c1a116fdf (patch) | |
tree | 8dbd6f49c518e090e1b7da18cb6ebc2c70113f7a /lib/mauve/notifiers | |
parent | 4ca1b2c8db777cd1e389a227072b1cd108e23d05 (diff) |
Fixed up date handling in the xmpp/email template
Changed basic notification logic in Alert.
Diffstat (limited to 'lib/mauve/notifiers')
-rw-r--r-- | lib/mauve/notifiers/templates/email.txt.erb | 6 | ||||
-rw-r--r-- | lib/mauve/notifiers/templates/xmpp.txt.erb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/mauve/notifiers/templates/email.txt.erb b/lib/mauve/notifiers/templates/email.txt.erb index eb49da9..1bc79a4 100644 --- a/lib/mauve/notifiers/templates/email.txt.erb +++ b/lib/mauve/notifiers/templates/email.txt.erb @@ -1,11 +1,11 @@ <%= alert.update_type.upcase %>: <% case alert.update_type when :cleared -%><%= MauveTime.now.to_s_relative(alert.cleared_at.to_time) %><% +%><%= alert.cleared_at.to_s_relative %><% when :acknowleged -%><%= MauveTime.now.to_s_relative(alert.acknowledged_at.to_time) %><% +%><%= alert.acknowledged_at.to_s_relative %><% else -%><%= MauveTime.now.to_s_relative(alert.raised_at.to_time) %><% +%><%= alert.raised_at.to_s_relative %><% end %>: <%= alert.summary %><% if alert.source != alert.subject diff --git a/lib/mauve/notifiers/templates/xmpp.txt.erb b/lib/mauve/notifiers/templates/xmpp.txt.erb index 22e2d8c..30ff1e6 100644 --- a/lib/mauve/notifiers/templates/xmpp.txt.erb +++ b/lib/mauve/notifiers/templates/xmpp.txt.erb @@ -7,7 +7,7 @@ when :acknowleged else %><%= MauveTime.now.to_s_relative(alert.raised_at.to_time) %><% end -%>: <%= alert.summary %><% +%>: <%= alert.subject %> <%= alert.summary %><% if alert.source != alert.subject %> -- from <%= alert.source %><% end |