diff --git a/README.md b/README.md index 15d494d..c3fba6d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Make sure you have node.js and npm installed. Clone the repository and install the dependencies -``` +```bash git clone https://github.com/cubedro/eth-netstats cd eth-netstats npm install @@ -23,7 +23,7 @@ npm install ##Run -``` +```bash npm start ``` diff --git a/public/images/screenshot-old.jpg b/public/images/screenshot-old.jpg new file mode 100644 index 0000000..b77d874 Binary files /dev/null and b/public/images/screenshot-old.jpg differ diff --git a/public/images/screenshot.jpg b/public/images/screenshot.jpg index b77d874..b10fabf 100644 Binary files a/public/images/screenshot.jpg and b/public/images/screenshot.jpg differ diff --git a/public/js/controllers.js b/public/js/controllers.js index 2fa8576..50578ff 100644 --- a/public/js/controllers.js +++ b/public/js/controllers.js @@ -45,6 +45,10 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { $scope.$apply(); }, 1000); + $scope.getNumber = function(num) { + return new Array(num); + } + // Socket listeners // ---------------- @@ -158,10 +162,9 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { $scope.difficultyChange = $scope.bestStats.difficulty; $scope.transactionDensity = $scope.bestStats.txDensity; $scope.gasSpending = $scope.bestStats.gasSpending; - $scope.miners = $scope.bestStats.miners; - $scope.getNumber = function(num) { - return new Array(num); + if(typeof $scope.bestStats.miners !== 'undefined') { + $scope.miners = $scope.bestStats.miners; } jQuery('.spark-blocktimes').sparkline($scope.lastBlocksTime.reverse(), {type: 'bar', tooltipSuffix: 's'});