diff --git a/public/js/controllers.js b/public/js/controllers.js index b74d506..cd4a32b 100644 --- a/public/js/controllers.js +++ b/public/js/controllers.js @@ -52,20 +52,14 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { case "init": $scope.nodes = data; - if($scope.nodes.length > 0) - { - toastr['success']("Got nodes list", "Got nodes!"); - } + if($scope.nodes.length > 0) toastr['success']("Got nodes list", "Got nodes!"); break; case "add": if(addNewNode(data)) - { toastr['success']("New node connected!", "New node!"); - } else { + else toastr['info']("Node reconnected!", "Node is back!"); - } - break; case "update": @@ -128,7 +122,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { radius: 3, latitude: node.geo.ll[0], longitude: node.geo.ll[1], - fillKey: $filter('bubbleClass')(node, $scope.bestBlock) + fillKey: $filter('bubbleClass')(node.stats, $scope.bestBlock) }; else return { @@ -137,6 +131,8 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { longitude: 0 }; }); + + console.log($scope.map); } $scope.$apply(); diff --git a/public/js/filters.js b/public/js/filters.js index 3a52971..725de41 100644 --- a/public/js/filters.js +++ b/public/js/filters.js @@ -101,7 +101,8 @@ function mainClass(node, bestBlock) if(node.peers === 0) return 'text-danger'; - return timeClass(node.block.timestamp); + // return timeClass(node.block.timestamp); + return peerClass(node.peers); } function peerClass(peers) diff --git a/public/js/lib/locale/en-gb.js b/public/js/lib/locale/en-gb.js index 62d3640..fee3f0d 100644 --- a/public/js/lib/locale/en-gb.js +++ b/public/js/lib/locale/en-gb.js @@ -39,7 +39,7 @@ s : 'a few sec', m : 'a min', mm : '%d min', - h : 'an h', + h : '1 h', hh : '%d h', d : 'a day', dd : '%d days', diff --git a/public/js/services.js b/public/js/services.js index dbde145..5d0d272 100644 --- a/public/js/services.js +++ b/public/js/services.js @@ -32,8 +32,8 @@ app.factory('toastr', function ($rootScope) { toastr.options = { "closeButton": false, "debug": false, + "progressBar": true, "newestOnTop": true, - "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null,