changed propagation bg to box

This commit is contained in:
cubedro 2015-04-10 00:36:29 +03:00
parent 662a5a3c20
commit c5db65c76a
3 changed files with 29 additions and 10 deletions

View File

@ -10,26 +10,44 @@ body {
-moz-font-smoothing: antialiased; -moz-font-smoothing: antialiased;
} }
.bg-success { .propagationBox {
position: relative;
width: 8px;
height: 8px;
float: left;
top: 8px;
margin-right: 5px;
}
.bg-success,
.text-success .propagationBox {
background: #7bcc3a; background: #7bcc3a;
} }
.bg-info { .bg-info,
.text-info .propagationBox {
background: #10a0de; background: #10a0de;
} }
.bg-warning { .bg-warning,
.text-warning .propagationBox {
background: #FFD162; background: #FFD162;
} }
.bg-orange { .bg-orange,
.text-orange .propagationBox {
background: #ff8a00; background: #ff8a00;
} }
.bg-danger { .bg-danger,
.text-danger .propagationBox {
background: #F74B4B; background: #F74B4B;
} }
.text-gray .propagationBox {
border: 1px solid #777;
}
.bg-success, .bg-success,
.bg-info, .bg-info,
.bg-warning, .bg-warning,

View File

@ -92,18 +92,18 @@ angular.module('netStatsApp.filters', [])
return 'text-gray'; return 'text-gray';
if(stats.block.propagation == 0) if(stats.block.propagation == 0)
return 'bg-info'; return 'text-info';
if(stats.block.propagation < 1000) if(stats.block.propagation < 1000)
return 'bg-success'; return 'text-success';
if(stats.block.propagation < 3000) if(stats.block.propagation < 3000)
return 'bg-warning'; return 'text-warning';
if(stats.block.propagation < 7000) if(stats.block.propagation < 7000)
return 'bg-orange'; return 'text-orange';
return 'bg-danger' return 'text-danger'
}; };
}) })
.filter('latencyFilter', function() { .filter('latencyFilter', function() {

View File

@ -151,5 +151,6 @@ block content
td(style="padding-left: 14px;") {{node.stats.block.transactions.length || 0}} td(style="padding-left: 14px;") {{node.stats.block.transactions.length || 0}}
td(class="{{ node.stats.block.received | timeClass : node.stats.active }}") {{node.stats.block.received | blockTimeFilter }} td(class="{{ node.stats.block.received | timeClass : node.stats.active }}") {{node.stats.block.received | blockTimeFilter }}
td(class="{{ node.stats | propagationTimeClass : bestBlock }}") {{node.stats.block.propagation | blockPropagationFilter}} td(class="{{ node.stats | propagationTimeClass : bestBlock }}") {{node.stats.block.propagation | blockPropagationFilter}}
div.propagationBox
td.peerPropagationChart(class="{{node.id}}") td.peerPropagationChart(class="{{node.id}}")
td(class="{{ node.stats.uptime | upTimeClass : node.stats.active }}") {{ node.stats.uptime | upTimeFilter }} td(class="{{ node.stats.uptime | upTimeClass : node.stats.active }}") {{ node.stats.uptime | upTimeFilter }}