added blocktime average to history
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user