Small improvements.
This commit is contained in:
parent
4fea5e12d7
commit
9ba17cbeb4
|
@ -29,11 +29,12 @@ class Stats::TicketEscalation
|
||||||
state = 'ok'
|
state = 'ok'
|
||||||
elsif own_escalated > 5
|
elsif own_escalated > 5
|
||||||
state = 'bad'
|
state = 'bad'
|
||||||
elsif own_escalated > 10
|
else
|
||||||
state = 'superbad'
|
state = 'superbad'
|
||||||
end
|
end
|
||||||
|
|
||||||
{
|
{
|
||||||
|
state: state,
|
||||||
average: average,
|
average: average,
|
||||||
state: state,
|
state: state,
|
||||||
own: own_escalated,
|
own: own_escalated,
|
||||||
|
|
|
@ -26,7 +26,7 @@ class Stats::TicketInProcess
|
||||||
state = 'supergood'
|
state = 'supergood'
|
||||||
average_in_percent = '-'
|
average_in_percent = '-'
|
||||||
|
|
||||||
if count != 0 && total != 0
|
if total != 0
|
||||||
in_process_precent = (count * 1000) / ((total * 1000) / 100)
|
in_process_precent = (count * 1000) / ((total * 1000) / 100)
|
||||||
if in_process_precent > 80
|
if in_process_precent > 80
|
||||||
state = 'supergood'
|
state = 'supergood'
|
||||||
|
@ -36,7 +36,7 @@ class Stats::TicketInProcess
|
||||||
state = 'ok'
|
state = 'ok'
|
||||||
elsif in_process_precent > 20
|
elsif in_process_precent > 20
|
||||||
state = 'bad'
|
state = 'bad'
|
||||||
elsif in_process_precent > 5
|
else
|
||||||
state = 'superbad'
|
state = 'superbad'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue