From 1c8bf33bd7663fcb67fe854d968670aa475173dd Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 19 Jul 2011 16:50:49 +0100 Subject: * Fixed supressed spelling mistakes (sic) * Added require thin_parser to http_server * Fixed spurious thaw attempts in mauve_thread. --- lib/mauve/notifiers/sms_aql.rb | 5 +++-- lib/mauve/notifiers/templates/email.html.erb | 4 ++-- lib/mauve/notifiers/templates/email.txt.erb | 4 ++-- lib/mauve/notifiers/templates/xmpp.txt.erb | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/mauve/notifiers') diff --git a/lib/mauve/notifiers/sms_aql.rb b/lib/mauve/notifiers/sms_aql.rb index d0cf630..9181be3 100644 --- a/lib/mauve/notifiers/sms_aql.rb +++ b/lib/mauve/notifiers/sms_aql.rb @@ -58,7 +58,7 @@ module Mauve template_file = File.join(File.dirname(__FILE__),"templates","sms.txt.erb") - txt += if File.exists?(template_file) + txt = if File.exists?(template_file) ERB.new(File.read(template_file)).result(binding).chomp else logger.error("Could not find sms.txt.erb template") @@ -74,7 +74,8 @@ module Mauve #txt += others.map { |alert| alert.summary_one_line }.join(", ") end - txt += "link: https://alert.bytemark.co.uk/alerts" + # TODO: Fix link to be accurate. + # txt += "link: https://alert.bytemark.co.uk/alerts" ## @TODO: Add a link to acknowledge the alert in the text? #txt += "Acknoweledge alert: "+ diff --git a/lib/mauve/notifiers/templates/email.html.erb b/lib/mauve/notifiers/templates/email.html.erb index 99f56d5..f0ce1be 100644 --- a/lib/mauve/notifiers/templates/email.html.erb +++ b/lib/mauve/notifiers/templates/email.html.erb @@ -19,9 +19,9 @@ end

Detail

<%= RedCloth.new(alert.detail).to_html %>

-<% if was_supressed and not is_suppressed %> +<% if was_suppressed and not is_suppressed %>

Better now. Your notifications have now restarted.

-<% elsif is_supressed and not was_suppressed %> +<% elsif is_suppressed and not was_suppressed %>

Too noisy! Your notifications have been suppressed.

<% end %>
--
Love mauve
xxx.
diff --git a/lib/mauve/notifiers/templates/email.txt.erb b/lib/mauve/notifiers/templates/email.txt.erb index a08ec55..dc5762b 100644 --- a/lib/mauve/notifiers/templates/email.txt.erb +++ b/lib/mauve/notifiers/templates/email.txt.erb @@ -19,9 +19,9 @@ end ----------------------------------------------------------------------- -<% if was_supressed and not is_suppressed +<% if was_suppressed and not is_suppressed %>Better now. Your notifications have now restarted.<% -elsif is_supressed and not was_suppressed +elsif is_suppressed and not was_suppressed %>Too noisy! Your notifications have been suppressed.<% end %> -- diff --git a/lib/mauve/notifiers/templates/xmpp.txt.erb b/lib/mauve/notifiers/templates/xmpp.txt.erb index d39500c..837fd67 100644 --- a/lib/mauve/notifiers/templates/xmpp.txt.erb +++ b/lib/mauve/notifiers/templates/xmpp.txt.erb @@ -15,6 +15,6 @@ end if was_suppressed and not is_suppressed %> Normal service has resumed.<% elsif is_suppressed and not was_suppressed -%> Further alerts supressed until things calm down.<% +%> Further alerts suppressed until things calm down.<% end %> -- cgit v1.2.1