diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-19 16:50:49 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-19 16:50:49 +0100 |
commit | 1c8bf33bd7663fcb67fe854d968670aa475173dd (patch) | |
tree | ce3362715b27c97fd5525cc3f50d38be1ace4647 /lib/mauve/notifiers | |
parent | 72654c0a6bdb83e27f16ea92d31e7127bd19ce19 (diff) |
* Fixed supressed spelling mistakes (sic)
* Added require thin_parser to http_server
* Fixed spurious thaw attempts in mauve_thread.
Diffstat (limited to 'lib/mauve/notifiers')
-rw-r--r-- | lib/mauve/notifiers/sms_aql.rb | 5 | ||||
-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 | 2 |
4 files changed, 8 insertions, 7 deletions
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 <h2>Detail</h2> <div><%= RedCloth.new(alert.detail).to_html %></div> <hr /> -<% if was_supressed and not is_suppressed %> +<% if was_suppressed and not is_suppressed %> <p><strong>Better now. Your notifications have now restarted.</strong></p> -<% elsif is_supressed and not was_suppressed %> +<% elsif is_suppressed and not was_suppressed %> <p><strong>Too noisy! Your notifications have been suppressed.</strong></p> <% end %> <address>-- <br />Love mauve<br />xxx.</address></body></html> 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 %> |