added more filters

This commit is contained in:
cubedro
2015-02-24 23:38:14 +02:00
parent eb7186e9a4
commit 146ac437b8
2 changed files with 30 additions and 2 deletions

View File

@@ -78,6 +78,34 @@ angular.module('netStatsApp.filters', [])
return timeClass(timestamp);
};
})
.filter('propagationTimeClass', function() {
return function(propagation) {
if(propagation <= 2000)
return 'text-success';
if(propagation <= 4000)
return 'text-info';
if(propagation <= 5000)
return 'text-warning';
return 'text-danger'
};
})
.filter('latencyClass', function() {
return function(time) {
if(time <= 1000)
return 'text-success';
if(time <= 2000)
return 'text-info';
if(time <= 3000)
return 'text-warning';
return 'text-danger'
};
})
.filter('blockTimeFilter', function() {
return function(timestamp) {
if(timestamp === 0)