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'

View File

@ -205,5 +205,5 @@ block content
div.propagationBox
span {{node.stats.block.propagation | blockPropagationFilter}}
td.peerPropagationChart(class="{{node.id}}")
td(class="{{ node.stats.propagationAvg | propagationAvgTimeClass }}") {{ node.stats.propagationAvg | blockPropagationFilter }}
td(class="{{ node.stats | propagationAvgTimeClass }}") {{ node.stats.propagationAvg | blockPropagationFilter }}
td(class="{{ node.stats.uptime | upTimeClass : node.stats.active }}") {{ node.stats.uptime | upTimeFilter }}