pull/5/head
KKudryavtsev 9 years ago
commit 1352dd898b
  1. 7
      lib/node.js
  2. 2
      src/js/controllers.js
  3. 2
      src/js/script.js
  4. 12
      src/views/index.jade

@ -32,6 +32,7 @@ var Node = function(data)
transactions: [], transactions: [],
uncles: [] uncles: []
}, },
syncing: false,
propagationAvg: 0, propagationAvg: 0,
latency: 0, latency: 0,
uptime: 100 uptime: 100
@ -113,6 +114,7 @@ Node.prototype.getInfo = function(callback)
stats: { stats: {
active: this.stats.active, active: this.stats.active,
mining: this.stats.mining, mining: this.stats.mining,
syncing: this.stats.syncing,
hashrate: this.stats.hashrate, hashrate: this.stats.hashrate,
peers: this.stats.peers, peers: this.stats.peers,
gasPrice: this.stats.gasPrice, gasPrice: this.stats.gasPrice,
@ -235,6 +237,7 @@ Node.prototype.setBasicStats = function(stats, callback)
{ {
this.stats.active = stats.active; this.stats.active = stats.active;
this.stats.mining = stats.mining; this.stats.mining = stats.mining;
this.stats.syncing = (!_.isUndefined(stats.syncing) ? stats.syncing : false);
this.stats.hashrate = stats.hashrate; this.stats.hashrate = stats.hashrate;
this.stats.peers = stats.peers; this.stats.peers = stats.peers;
this.stats.gasPrice = stats.gasPrice; this.stats.gasPrice = stats.gasPrice;
@ -284,6 +287,7 @@ Node.prototype.getStats = function()
stats: { stats: {
active: this.stats.active, active: this.stats.active,
mining: this.stats.mining, mining: this.stats.mining,
syncing: this.stats.syncing,
hashrate: this.stats.hashrate, hashrate: this.stats.hashrate,
peers: this.stats.peers, peers: this.stats.peers,
gasPrice: this.stats.gasPrice, gasPrice: this.stats.gasPrice,
@ -314,6 +318,7 @@ Node.prototype.getBasicStats = function()
stats: { stats: {
active: this.stats.active, active: this.stats.active,
mining: this.stats.mining, mining: this.stats.mining,
syncing: this.stats.syncing,
hashrate: this.stats.hashrate, hashrate: this.stats.hashrate,
peers: this.stats.peers, peers: this.stats.peers,
gasPrice: this.stats.gasPrice, gasPrice: this.stats.gasPrice,
@ -370,7 +375,7 @@ Node.prototype.getBlockNumber = function()
Node.prototype.canUpdate = function() Node.prototype.canUpdate = function()
{ {
// return (this.info.canUpdateHistory && this.trusted) || false; // return (this.info.canUpdateHistory && this.trusted) || false;
return (this.info.canUpdateHistory) || false; return (this.info.canUpdateHistory || (this.stats.syncing === false && this.stats.peers > 0)) || false;
} }
Node.prototype.isInactiveAndOld = function() Node.prototype.isInactiveAndOld = function()

@ -37,7 +37,7 @@ netStatsApp.controller('StatsCtrl', function($scope, $filter, $localStorage, soc
$scope.latency = 0; $scope.latency = 0;
$scope.currentApiVersion = "0.0.16"; $scope.currentApiVersion = "0.1.0";
$scope.predicate = $localStorage.predicate || ['-pinned', '-stats.active', '-stats.block.number', 'stats.block.propagation']; $scope.predicate = $localStorage.predicate || ['-pinned', '-stats.active', '-stats.block.number', 'stats.block.propagation'];
$scope.reverse = $localStorage.reverse || false; $scope.reverse = $localStorage.reverse || false;

@ -32,5 +32,5 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-63657296-1', 'auto'); ga('create', 'UA-68390837-2', 'auto');
ga('send', 'pageview'); ga('send', 'pageview');

@ -164,12 +164,12 @@ block content
i.icon-warning-o i.icon-warning-o
span.small-title ATTENTION! span.small-title ATTENTION!
span.small-value This page does not represent the entire state of the ethereum network - listing a node on this page is a voluntary process. span.small-value This page does not represent the entire state of the ethereum network - listing a node on this page is a voluntary process.
div.col-xs-12.stat-holder.box //- div.col-xs-12.stat-holder.box
div.active-nodes.text-danger //- div.active-nodes.text-danger
i.icon-hashrate //- i.icon-hashrate
span.small-title SECURITY ALERT //- span.small-title SECURITY ALERT
span.small-value //- span.small-value
a(href="https://blog.ethereum.org/2015/09/10/security-alert-previous-security-patch-can-lead-to-invalid-state-root-on-go-clients-with-a-specific-transaction-sequence-fixed-please-update/", target="_blank", class="text-danger") Read the blog post //- a(href="https://blog.ethereum.org/2015/09/10/security-alert-previous-security-patch-can-lead-to-invalid-state-root-on-go-clients-with-a-specific-transaction-sequence-fixed-please-update/", target="_blank", class="text-danger") Read the blog post
//- div.clearfix //- div.clearfix

Loading…
Cancel
Save