|
|
@ -16,6 +16,8 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { |
|
|
|
$scope.avgBlockTime = 0; |
|
|
|
$scope.avgBlockTime = 0; |
|
|
|
|
|
|
|
|
|
|
|
$scope.lastBlocksTime = []; |
|
|
|
$scope.lastBlocksTime = []; |
|
|
|
|
|
|
|
$scope.difficultyChange = []; |
|
|
|
|
|
|
|
$scope.transactionDensity = []; |
|
|
|
|
|
|
|
|
|
|
|
$scope.nodes = []; |
|
|
|
$scope.nodes = []; |
|
|
|
$scope.map = []; |
|
|
|
$scope.map = []; |
|
|
@ -143,6 +145,18 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { |
|
|
|
|
|
|
|
|
|
|
|
jQuery('.spark-blocktimes').sparkline($scope.lastBlocksTime, {type: 'bar', tooltipSuffix: 's'}); |
|
|
|
jQuery('.spark-blocktimes').sparkline($scope.lastBlocksTime, {type: 'bar', tooltipSuffix: 's'}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.difficultyChange = _.max($scope.nodes, function(node) { |
|
|
|
|
|
|
|
return parseInt(node.stats.block.number); |
|
|
|
|
|
|
|
}).stats.difficulty; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jQuery('.spark-difficulty').sparkline($scope.difficultyChange, {type: 'bar'}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.transactionDensity = _.max($scope.nodes, function(node) { |
|
|
|
|
|
|
|
return parseInt(node.stats.block.number); |
|
|
|
|
|
|
|
}).stats.txDensity; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jQuery('.spark-transactions').sparkline($scope.transactionDensity, {type: 'bar'}); |
|
|
|
|
|
|
|
|
|
|
|
$scope.map = _.map($scope.nodes, function(node) { |
|
|
|
$scope.map = _.map($scope.nodes, function(node) { |
|
|
|
if(node.geo != null) |
|
|
|
if(node.geo != null) |
|
|
|
return { |
|
|
|
return { |
|
|
|