diff options
author | telyn <telyn@bytemark.co.uk> | 2018-01-30 10:19:59 +0000 |
---|---|---|
committer | telyn <telyn@bytemark.co.uk> | 2018-01-30 10:19:59 +0000 |
commit | b37a469b817e55b06b8d6a22c1087506a2221c14 (patch) | |
tree | 5c5f5510b389c31ee8686e07b451e22738d4c253 /lib/mauve | |
parent | 0139aa17ab739365745c3447de5634b665391a77 (diff) | |
parent | 9bdd63df6f71ea7322f3d65aa88a79cb17d74b9c (diff) |
Merge branch 'develop' into gem
Diffstat (limited to 'lib/mauve')
-rw-r--r-- | lib/mauve/notifiers/hipchat.rb | 12 | ||||
-rw-r--r-- | lib/mauve/sender.rb | 12 |
2 files changed, 6 insertions, 18 deletions
diff --git a/lib/mauve/notifiers/hipchat.rb b/lib/mauve/notifiers/hipchat.rb index 7537bc5..b29f450 100644 --- a/lib/mauve/notifiers/hipchat.rb +++ b/lib/mauve/notifiers/hipchat.rb @@ -27,13 +27,13 @@ module Mauve def send_alert(destination, alert, all_alerts, conditions = {}) msg = prepare_message(destination, alert, all_alerts, conditions) - colour = case alert.level - when :urgent - "red" - when :normal - "yellow" + colour = case alert.update_type + when 'cleared' + 'green' + when 'acknowledged' + 'yellow' else - "green" + 'red' end opts = { diff --git a/lib/mauve/sender.rb b/lib/mauve/sender.rb index 29c085b..7a965ab 100644 --- a/lib/mauve/sender.rb +++ b/lib/mauve/sender.rb @@ -1,11 +1,6 @@ # encoding: UTF-8 require 'ipaddr' require 'socket' -#begin -# require 'locale' -#rescue LoadError - # Do nothing -- these are bonus libraries :) -#end require 'mauve/mauve_resolv' require 'mauve/mauve_time' @@ -153,13 +148,6 @@ module Mauve update.replace ||= false # - # Check the locale charset. This is to maximise the amout of information - # mauve receives, rather than provide proper sanitized data for the server. - # - from_charset = (Locale.current.charset || Locale.charset) if defined?(Locale) - from_charset ||= "UTF-8" - - # # # update.each_field do |field, value| |