aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/notifiers/templates/xmpp.html.erb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-09-06 15:32:31 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-09-06 15:32:31 +0100
commitd2309ac606e008123d42fcea0819f80fe2204f70 (patch)
tree2dd085c8cec56d9b0f3d14d8975cc10a2bc179ad /lib/mauve/notifiers/templates/xmpp.html.erb
parent76e9883e5408e30d74187ef7b272312eb7479c50 (diff)
Update to suppression code.
XMPP interface fixed.
Diffstat (limited to 'lib/mauve/notifiers/templates/xmpp.html.erb')
-rw-r--r--lib/mauve/notifiers/templates/xmpp.html.erb16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/mauve/notifiers/templates/xmpp.html.erb b/lib/mauve/notifiers/templates/xmpp.html.erb
index c6bfaed..7c0bbfd 100644
--- a/lib/mauve/notifiers/templates/xmpp.html.erb
+++ b/lib/mauve/notifiers/templates/xmpp.html.erb
@@ -1,5 +1,5 @@
<html xmlns="http://jabber.org/protocol/xhtml-im"><body xmlns="OAhttp://www.w3.org/1999/xhtml">
-<a href="<%=WebInterface.url_for(alert)%>"><%= alert.update_type.upcase %></a>: <%
+<a href="<%=WebInterface.url_for(alert)%>"><%= alert.id%>: <%= alert.update_type.upcase %></a>: <%
case alert.update_type
when "cleared"
%><%= alert.cleared_at.to_s_relative %><%
@@ -8,14 +8,16 @@ when "acknowledged"
else
%><%= alert.raised_at.to_s_relative %><%
end
-%>: <%= alert.subject %>: <%= alert.summary %><%
+%>: <strong><%= alert.subject %>:</strong> <%= alert.summary %><%
if alert.source != alert.subject
%> -- from <%= alert.source %><%
end
%>.<%
-if was_suppressed and not is_suppressed
-%><em> Normal service has resumed.</em><%
-elsif is_suppressed and not was_suppressed
-%><em> Further alerts suppressed until things calm down.</em><%
-end
+if defined? was_suppressed and defined? will_suppress
+ if was_suppressed and not will_suppress
+%><br /><em>Normal service has resumed.</em><%
+ elsif will_suppress and not was_suppressed
+%><br /><em>Further alerts suppressed until things calm down.</em><%
+ end
+end
%></body></html>