Merge pull request #25 from cubedro/develop

fixed arrival time
This commit is contained in:
Marian OANCΞA 2015-03-26 16:57:23 +02:00
commit 6746fe970f
3 changed files with 3 additions and 2 deletions

View File

@ -69,6 +69,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
break;
case "update":
data.stats.block.when = (new Date()).getTime() - data.stats.block.arrival;
$scope.nodes[findIndex({id: data.id})].stats = data.stats;
break;

View File

@ -116,7 +116,7 @@ angular.module('netStatsApp.filters', [])
})
.filter('blockPropagationFilter', function() {
return function(ms) {
ms = (new Date()).getTime() - ms;
// ms = (new Date()).getTime() - ms;
var result = 0;
if(ms < 1000) {

View File

@ -128,5 +128,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.txCount}}
td(class="{{ node.stats.block.timestamp | timeClass }}") {{node.stats.block.timestamp | blockTimeFilter }}
td(class="{{ node.stats.block.propagation | propagationTimeClass }}") {{node.stats.block.arrival | blockPropagationFilter}}
td(class="{{ node.stats.block.propagation | propagationTimeClass }}") {{node.stats.block.when | blockPropagationFilter}}
td(class="{{ node.stats.uptime | upTimeClass }}") {{ node.stats.uptime | upTimeFilter }}