Merge pull request #94 from cubedro/develop

Changed uncle count range
This commit is contained in:
Marian OANCΞA 2015-04-24 06:46:52 +03:00
commit d56d39efb0
4 changed files with 13 additions and 5 deletions

View File

@ -2,10 +2,12 @@ var _ = require('lodash');
var d3 = require('d3');
var MAX_HISTORY = 1000;
var MAX_PEER_PROPAGATION = 36;
var MIN_PROPAGATION_RANGE = 0;
var MAX_PROPAGATION_RANGE = 20000;
var MAX_UNCLE_BINS = 36;
var MAX_UNCLES_PER_BIN = 25;
var MAX_BINS = 40;
var History = function History(data)
@ -170,14 +172,14 @@ History.prototype.getUncleCount = function(id)
console.log(uncles);
var uncleBins = _.fill(Array(MAX_UNCLE_BINS), 0);
var uncleBins = _.fill(Array(MAX_BINS), 0);
var sumMapper = function(array, key) {
uncleBins[key] = _.sum(array);
return _.sum(array);
};
_.map(_.chunk(uncles, MAX_BINS), sumMapper);
_.map(_.chunk(uncles, MAX_UNCLES_PER_BIN), sumMapper);
return uncleBins;
}

View File

@ -114,6 +114,11 @@ div.small-title-miner {
color: #aaa;
}
span.small-title span.small {
letter-spacing: 0px;
color: #666;
}
.big-info .big-details {
display: block;
font-weight: 200;

View File

@ -135,7 +135,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
$scope.uncleCount = data;
$scope.unclesInLast = data[0];
jQuery('.spark-uncles').sparkline($scope.uncleCount.reverse(), {type: 'bar'});
jQuery('.spark-uncles').sparkline($scope.uncleCount.reverse(), {type: 'bar', barSpacing: 1});
break;

View File

@ -77,7 +77,8 @@ block content
div.col-xs-4.stat-holder
div.big-info.chart
span.small-title uncle count
span.small-title uncle count #[ ]
span.small (25 blocks per bar)
span.big-details.spark-uncles
div.col-xs-4.stat-holder