From 4c642e3dc17f98e5560763f019c3eb18e09e5e8c Mon Sep 17 00:00:00 2001 From: Chris Elsworth Date: Tue, 31 Jan 2017 23:30:40 +0000 Subject: Tweak HipChat colours to be a bit more useful MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > It would be lovely if cleared messages were green > —- Tom Hill --- lib/mauve/notifiers/hipchat.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/mauve/notifiers/hipchat.rb') 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 = { -- cgit v1.2.1