Small improvements.

This commit is contained in:
Martin Edenhofer 2015-09-07 02:08:15 +02:00
parent 4fea5e12d7
commit 9ba17cbeb4
2 changed files with 4 additions and 3 deletions

View file

@ -29,11 +29,12 @@ class Stats::TicketEscalation
state = 'ok'
elsif own_escalated > 5
state = 'bad'
elsif own_escalated > 10
else
state = 'superbad'
end
{
state: state,
average: average,
state: state,
own: own_escalated,

View file

@ -26,7 +26,7 @@ class Stats::TicketInProcess
state = 'supergood'
average_in_percent = '-'
if count != 0 && total != 0
if total != 0
in_process_precent = (count * 1000) / ((total * 1000) / 100)
if in_process_precent > 80
state = 'supergood'
@ -36,7 +36,7 @@ class Stats::TicketInProcess
state = 'ok'
elsif in_process_precent > 20
state = 'bad'
elsif in_process_precent > 5
else
state = 'superbad'
end
end