added blocktime average to history

This commit is contained in:
cubedro
2015-04-28 12:31:49 +03:00
parent e9618aac5c
commit 4f7ba9f578
2 changed files with 2 additions and 4 deletions

View File

@@ -153,6 +153,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
case "charts":
$scope.lastBlocksTime = data.blocktime;
$scope.avgBlockTime = data.avgBlocktime;
$scope.difficultyChart = data.difficulty;
$scope.transactionDensity = data.transactions;
$scope.gasSpending = data.gasSpending;
@@ -279,10 +280,6 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
}
}
$scope.avgBlockTime = _.max($scope.nodes, function(node) {
return parseInt(node.stats.block.number);
}).stats.blocktimeAvg;
$scope.upTimeTotal = _.reduce($scope.nodes, function(total, node) {
return total + node.stats.uptime;
}, 0) / $scope.nodes.length;