fixed avg propagation time color when inactive

This commit is contained in:
cubedro
2015-04-28 18:26:54 +03:00
parent 6e3fb3559d
commit f202ff059a
2 changed files with 9 additions and 6 deletions

View File

@@ -175,17 +175,20 @@ angular.module('netStatsApp.filters', [])
};
})
.filter('propagationAvgTimeClass', function() {
return function(propagation) {
if(propagation == 0)
return function(stats) {
if( ! stats.active)
return 'text-gray';
if(stats.propagationAvg == 0)
return 'text-info';
if(propagation < 1000)
if(stats.propagationAvg < 1000)
return 'text-success';
if(propagation < 3000)
if(stats.propagationAvg < 3000)
return 'text-warning';
if(propagation < 7000)
if(stats.propagationAvg < 7000)
return 'text-orange';
return 'text-danger'