fixed avg propagation time color when inactive
This commit is contained in:
parent
6e3fb3559d
commit
f202ff059a
@ -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'
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user