diff options
Diffstat (limited to 'lib/mauve/notifiers/templates')
-rw-r--r-- | lib/mauve/notifiers/templates/email.html.erb | 28 | ||||
-rw-r--r-- | lib/mauve/notifiers/templates/email.txt.erb | 24 | ||||
l---------[-rw-r--r--] | lib/mauve/notifiers/templates/sms.txt.erb | 1 | ||||
-rw-r--r-- | lib/mauve/notifiers/templates/xmpp.html.erb | 0 | ||||
-rw-r--r-- | lib/mauve/notifiers/templates/xmpp.txt.erb | 15 |
5 files changed, 67 insertions, 1 deletions
diff --git a/lib/mauve/notifiers/templates/email.html.erb b/lib/mauve/notifiers/templates/email.html.erb index e69de29..fcf0620 100644 --- a/lib/mauve/notifiers/templates/email.html.erb +++ b/lib/mauve/notifiers/templates/email.html.erb @@ -0,0 +1,28 @@ +<p><strong><%= alert.update_type.upcase %></strong> <% +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 +%> -- <em>from <%= alert.source %></em><% +end +%>. + +<hr /> + +<div> +<%=alert.detail %> +</div> + +<hr /> + +<address> +--<br /> +Love mauve<br /> +xxx. +</address> diff --git a/lib/mauve/notifiers/templates/email.txt.erb b/lib/mauve/notifiers/templates/email.txt.erb index e69de29..8f7e9a4 100644 --- a/lib/mauve/notifiers/templates/email.txt.erb +++ b/lib/mauve/notifiers/templates/email.txt.erb @@ -0,0 +1,24 @@ +<%= 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 +%>. + +-- Details ------------------------------------------------------------ + +<%= Sanitize.clean(alert.detail) %> + +----------------------------------------------------------------------- + +-- +Love mauve. +xx diff --git a/lib/mauve/notifiers/templates/sms.txt.erb b/lib/mauve/notifiers/templates/sms.txt.erb index e69de29..802c711 100644..120000 --- a/lib/mauve/notifiers/templates/sms.txt.erb +++ b/lib/mauve/notifiers/templates/sms.txt.erb @@ -0,0 +1 @@ +xmpp.txt.erb
\ No newline at end of file diff --git a/lib/mauve/notifiers/templates/xmpp.html.erb b/lib/mauve/notifiers/templates/xmpp.html.erb deleted file mode 100644 index e69de29..0000000 --- a/lib/mauve/notifiers/templates/xmpp.html.erb +++ /dev/null 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 +%>. |