Improved escalation notice.

This commit is contained in:
Martin Edenhofer 2013-03-07 11:34:42 +01:00
parent f86fa3968c
commit 72778a2d78
2 changed files with 6 additions and 3 deletions

View file

@ -114,8 +114,10 @@ class App.Controller extends Spine.Controller
if escalation
if diff > 0
escalated = '-'
if diff > -60 * 60
if diff >= 0
style = "class=\"label label-important\""
else if diff > -60 * 60
style = "class=\"label label-warning\""
else
style = "class=\"label label-success\""

View file

@ -3,8 +3,9 @@ class Sla < ApplicationModel
store :data
validates :name, :presence => true
after_create :escalation_calculation_rebuild
after_update :escalation_calculation_rebuild
after_create :escalation_calculation_rebuild
after_update :escalation_calculation_rebuild
after_destroy :escalation_calculation_rebuild
private
def escalation_calculation_rebuild