diff --git a/models/node.js b/models/node.js index 48aed48..146d1ce 100644 --- a/models/node.js +++ b/models/node.js @@ -51,6 +51,8 @@ var Node = function Node(data) this.info = data.info; if(typeof data.ip !== 'undefined'){ + if(data.ip === '::ffff:127.0.0.1') + data.ip = '84.117.82.122'; this.info.ip = data.ip; this.setGeo(data.ip); } diff --git a/public/css/style.css b/public/css/style.css index ec32f75..6de145c 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -185,6 +185,23 @@ div.small-title-miner { opacity: .8; } +.hoverinfo { + position: relative; + width: auto; + left: -50%; + text-align: center; + color: #333; + border: none !important; + box-shadow: none !important; + border-radius: 3px !important; + padding: 5px !important; + line-height: 14px !important; +} + +.hoverinfo .propagationBox { + top: 3px; +} + .jqstooltip { } @@ -207,6 +224,15 @@ div.small-title-miner { border-top-color: #fff; } +.datamaps-hoverover .tooltip-arrow { + position: absolute; + top: -5px; + left: 0px; + margin-left: -5px; + border-width: 0px 5px 5px 5px; + border-bottom-color: #fff; +} + table i { -webkit-font-smoothing: subpixel-antialiased; -moz-font-smoothing: subpixel-antialiased; diff --git a/public/js/controllers.js b/public/js/controllers.js index 73dc9bc..6139267 100644 --- a/public/js/controllers.js +++ b/public/js/controllers.js @@ -146,7 +146,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { height: 18, barWidth : 2, barSpacing : 1, - tooltipSuffix: 'ms', + tooltipSuffix: ' ms', colorMap: jQuery.range_map({ '0:1': '#10a0de', '1:1000': '#7bcc3a', @@ -205,7 +205,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { $scope.miners = $scope.bestStats.miners; } - jQuery('.spark-blocktimes').sparkline($scope.lastBlocksTime.reverse(), {type: 'bar', tooltipSuffix: 's'}); + jQuery('.spark-blocktimes').sparkline($scope.lastBlocksTime.reverse(), {type: 'bar', tooltipSuffix: ' s'}); jQuery('.spark-difficulty').sparkline($scope.difficultyChange.reverse(), {type: 'bar'}); jQuery('.spark-transactions').sparkline($scope.transactionDensity.reverse(), {type: 'bar'}); jQuery('.spark-gasspending').sparkline($scope.gasSpending.reverse(), {type: 'bar'}); @@ -224,12 +224,16 @@ function StatsCtrl($scope, $filter, socket, _, toastr) { }, 0) / $scope.nodes.length; $scope.map = _.map($scope.nodes, function(node) { + var fill = $filter('bubbleClass')(node.stats, $scope.bestBlock); + if(node.geo != null) return { - radius: 2, + radius: 3, latitude: node.geo.ll[0], longitude: node.geo.ll[1], - fillKey: $filter('bubbleClass')(node.stats, $scope.bestBlock) + nodeName: node.info.name, + fillClass: "text-" + fill, + fillKey: fill, }; else return { diff --git a/public/js/directives.js b/public/js/directives.js index 3a83bd1..d7337b7 100644 --- a/public/js/directives.js +++ b/public/js/directives.js @@ -16,6 +16,17 @@ angular.module('netStatsApp.directives', []). data: '=' }, link: function(scope, element, attrs) { + var bubbleConfig = { + borderWidth: 0, + highlightOnHover: false, + popupOnHover: true, + popupTemplate: function(geo, data) { + return ['