diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-06-13 11:02:37 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-06-13 11:02:37 +0100 |
commit | b22cbc87927553f6dbb5754281e95fe9bad2eed1 (patch) | |
tree | 5575791fe84492648a8cc92433c267815056507a /lib/mauve/notifiers/templates/xmpp.txt.erb | |
parent | 495c44445642cfae8f23fadde299ad5307f5be58 (diff) |
* Tidied up mauveserver to handle HUP restarts
* Added HTML santizing to the alert class, so bad HTML is stripped as part of
processing.
* Alert#cleared? now means "not raised"
* Better error handling in the Timer class, making sure that the timer never
gets permanently frozen.
* Moved notification and packet buffers to the Server class, meaning that if
the Processor or Notifier threads crash, we don't lose all the items waiting
to be processed/notified.
* XMPP/Email Alerts now use templates, instead of instance methods.
* Emails now get sent as multipart with HTML to allow detail fields to be
shown as nature intended.
Diffstat (limited to 'lib/mauve/notifiers/templates/xmpp.txt.erb')
-rw-r--r-- | lib/mauve/notifiers/templates/xmpp.txt.erb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/mauve/notifiers/templates/xmpp.txt.erb b/lib/mauve/notifiers/templates/xmpp.txt.erb index 881c197..22e2d8c 100644 --- a/lib/mauve/notifiers/templates/xmpp.txt.erb +++ b/lib/mauve/notifiers/templates/xmpp.txt.erb @@ -1 +1,14 @@ -<%=arse %> +<%= alert.update_type.upcase %>: <% +case alert.update_type +when :cleared +%><%= MauveTime.now.to_s_relative(alert.cleared_at.to_time) %><% +when :acknowleged +%><%= MauveTime.now.to_s_relative(alert.acknowledged_at.to_time) %><% +else +%><%= MauveTime.now.to_s_relative(alert.raised_at.to_time) %><% +end +%>: <%= alert.summary %><% +if alert.source != alert.subject +%> -- from <%= alert.source %><% +end +%>. |