added gas spending chart
This commit is contained in:
parent
0d584e1562
commit
380d677793
@ -18,6 +18,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
$scope.lastBlocksTime = [];
|
||||
$scope.difficultyChange = [];
|
||||
$scope.transactionDensity = [];
|
||||
$scope.gasSpending = [];
|
||||
|
||||
$scope.nodes = [];
|
||||
$scope.map = [];
|
||||
@ -157,6 +158,12 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
|
||||
jQuery('.spark-transactions').sparkline($scope.transactionDensity, {type: 'bar'});
|
||||
|
||||
$scope.gasSpending = _.max($scope.nodes, function(node) {
|
||||
return parseInt(node.stats.block.number);
|
||||
}).stats.gasSpending;
|
||||
|
||||
jQuery('.spark-gasspending').sparkline($scope.gasSpending, {type: 'bar'});
|
||||
|
||||
$scope.map = _.map($scope.nodes, function(node) {
|
||||
if(node.geo != null)
|
||||
return {
|
||||
|
@ -79,6 +79,11 @@ block content
|
||||
span.small-title transactions
|
||||
span.big-details.spark-transactions {{ transactionDensity.join(',') }}
|
||||
|
||||
div.col-xs-3.stat-holder
|
||||
div.row.big-info.chart
|
||||
span.small-title gas spending
|
||||
span.big-details.spark-gasspending {{ gasSpending.join(',') }}
|
||||
|
||||
//- div.clearfix
|
||||
|
||||
div.col-lg-4
|
||||
|
Loading…
Reference in New Issue
Block a user