diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-06-17 12:48:53 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-06-17 12:48:53 +0100 |
commit | a2fc458d4c1bc6027760546653cb153e775576ce (patch) | |
tree | f3af3775adab48d9a18495eeb410cf48269ffd9e /lib/mauve/notifiers | |
parent | 4b39583e63b59d73e2855d776f7cca12d734f2af (diff) |
* Notifications are now run in their separate threads.
* Queues are now just arrays instead of "Queue"s
* Updated templates to be saner.
* Added flusing of queues when threads stop
Diffstat (limited to 'lib/mauve/notifiers')
-rw-r--r-- | lib/mauve/notifiers/templates/email.html.erb | 4 | ||||
-rw-r--r-- | lib/mauve/notifiers/templates/email.txt.erb | 4 | ||||
-rw-r--r-- | lib/mauve/notifiers/templates/xmpp.txt.erb | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/mauve/notifiers/templates/email.html.erb b/lib/mauve/notifiers/templates/email.html.erb index 6c323b0..46b2ebc 100644 --- a/lib/mauve/notifiers/templates/email.html.erb +++ b/lib/mauve/notifiers/templates/email.html.erb @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body> <p><strong><%= alert.update_type.upcase %>:</strong> <% -case alert.update_type +case alert.update_type.to_sym when :cleared %><%= alert.cleared_at.to_s_relative %><% when :acknowleged @@ -10,7 +10,7 @@ when :acknowleged else %><%= alert.raised_at.to_s_relative %><% end -%>: <%= alert.summary %><% +%>: <%= alert.subject %>: <%= alert.summary %><% if alert.source != alert.subject %> -- <em>from <%= alert.source %></em><% end diff --git a/lib/mauve/notifiers/templates/email.txt.erb b/lib/mauve/notifiers/templates/email.txt.erb index 1bc79a4..5db9bd6 100644 --- a/lib/mauve/notifiers/templates/email.txt.erb +++ b/lib/mauve/notifiers/templates/email.txt.erb @@ -1,5 +1,5 @@ <%= alert.update_type.upcase %>: <% -case alert.update_type +case alert.update_type.to_sym when :cleared %><%= alert.cleared_at.to_s_relative %><% when :acknowleged @@ -7,7 +7,7 @@ when :acknowleged else %><%= alert.raised_at.to_s_relative %><% end -%>: <%= alert.summary %><% +%>: <%= alert.subject %>: <%= alert.summary %><% if alert.source != alert.subject %> -- from <%= alert.source %><% end diff --git a/lib/mauve/notifiers/templates/xmpp.txt.erb b/lib/mauve/notifiers/templates/xmpp.txt.erb index eafc12b..282f370 100644 --- a/lib/mauve/notifiers/templates/xmpp.txt.erb +++ b/lib/mauve/notifiers/templates/xmpp.txt.erb @@ -1,13 +1,13 @@ <%= alert.update_type.upcase %>: <% -case alert.update_type +case alert.update_type.to_sym when :cleared %><%= alert.cleared_at.to_s_relative %><% when :acknowleged -%><%= alert.acknowledged_at.to_time.to_s_relative %><% +%><%= alert.acknowledged_at.to_s_relative %><% else %><%= alert.raised_at.to_s_relative %><% end -%>: <%= alert.subject %> <%= alert.summary %><% +%>: <%= alert.subject %>: <%= alert.summary %><% if alert.source != alert.subject %> -- from <%= alert.source %><% end |