Improved escalation notice.
This commit is contained in:
parent
f86fa3968c
commit
72778a2d78
2 changed files with 6 additions and 3 deletions
|
@ -114,8 +114,10 @@ class App.Controller extends Spine.Controller
|
||||||
if escalation
|
if escalation
|
||||||
if diff > 0
|
if diff > 0
|
||||||
escalated = '-'
|
escalated = '-'
|
||||||
if diff > -60 * 60
|
if diff >= 0
|
||||||
style = "class=\"label label-important\""
|
style = "class=\"label label-important\""
|
||||||
|
else if diff > -60 * 60
|
||||||
|
style = "class=\"label label-warning\""
|
||||||
else
|
else
|
||||||
style = "class=\"label label-success\""
|
style = "class=\"label label-success\""
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,9 @@ class Sla < ApplicationModel
|
||||||
store :data
|
store :data
|
||||||
validates :name, :presence => true
|
validates :name, :presence => true
|
||||||
|
|
||||||
after_create :escalation_calculation_rebuild
|
after_create :escalation_calculation_rebuild
|
||||||
after_update :escalation_calculation_rebuild
|
after_update :escalation_calculation_rebuild
|
||||||
|
after_destroy :escalation_calculation_rebuild
|
||||||
|
|
||||||
private
|
private
|
||||||
def escalation_calculation_rebuild
|
def escalation_calculation_rebuild
|
||||||
|
|
Loading…
Reference in a new issue