Merge pull request #37 from cubedro/develop

Fixed propagation
pull/5/head
Marian OANCΞA 10 years ago
commit f4bdb6d7ee
  1. 11
      public/js/controllers.js
  2. 2
      views/index.jade

@ -74,7 +74,16 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
break;
case "update":
$scope.nodes[findIndex({id: data.id})].stats = data.stats;
var index = findIndex({id: data.id});
if(data.stats.block.number > $scope.nodes[index].stats.block.number) {
data.stats.block.firstarrived = (data.stats.block.number > $scope.bestBlock ? data.stats.block.received : $scope.lastBlock);
} else {
data.stats.block.firstarrived = $scope.nodes[index].stats.block.firstarrived;
}
$scope.nodes[index].stats = data.stats;
break;
case "info":

@ -140,5 +140,5 @@ block content
//- div.small Difficulty: {{node.stats.block.difficulty | gasFilter}} | Gas used: {{node.stats.block.gasUsed | gasFilter}} | Min gas price: {{node.stats.block.minGasPrice | gasFilter}} | Gas limit: {{node.stats.block.gasLimit | gasFilter}}
td(style="padding-left: 18px;") {{node.stats.block.transactions.length || 0}}
td(class="{{ node.stats.block.timestamp | timeClass }}") {{node.stats.block.received | blockTimeFilter }}
td(class="{{ node.stats.block.received | propagationTimeClass : lastBlock }}") {{node.stats.block.received | blockPropagationFilter : lastBlock}}
td(class="{{ node.stats.block.received | propagationTimeClass : node.stats.block.firstarrived }}") {{node.stats.block.received | blockPropagationFilter : node.stats.block.firstarrived}}
td(class="{{ node.stats.uptime | upTimeClass }}") {{ node.stats.uptime | upTimeFilter }}

Loading…
Cancel
Save