aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mauve/notifiers/sms_aql.rb12
1 files changed, 9 insertions, 3 deletions
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)?