From 0dcb2755a2a68d447c8faf673db3bbe73caa12a8 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 17 Jun 2011 09:09:10 +0100 Subject: Updated sms notifier. --- lib/mauve/notifiers/sms_aql.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/mauve') diff --git a/lib/mauve/notifiers/sms_aql.rb b/lib/mauve/notifiers/sms_aql.rb index 1cf8c04..c1c356b 100644 --- a/lib/mauve/notifiers/sms_aql.rb +++ b/lib/mauve/notifiers/sms_aql.rb @@ -57,9 +57,15 @@ module Mauve "" end - txt += "#{alert.update_type.upcase}: " - txt += alert.summary_one_line - + template_file = File.join(File.dirname(__FILE__),"templates","sms.txt.erb") + + 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") + alert.to_s + end + others = all_alerts-[alert] if !others.empty? txt += (1 == others.length)? -- cgit v1.2.1