added location tooltip
This commit is contained in:
@@ -25,6 +25,5 @@ function StatsCtrl($scope, socket, _) {
|
||||
$scope.nodesActive = _.filter($scope.nodes, function(node){ return node.stats.active == true; }).length;
|
||||
$scope.bestBlock = _.max($scope.nodes, function(node){ return parseInt(node.stats.block.height); }).stats.block.height;
|
||||
$scope.lastBlock = _.max($scope.nodes, function(node){ return parseInt(node.stats.block.timestamp); }).stats.block.timestamp;
|
||||
$scope.apply();
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,10 @@ angular.module('netStatsApp.filters', [])
|
||||
return function(timestamp) {
|
||||
return timeClass(timestamp);
|
||||
};
|
||||
}).filter('geoTooltip', function() {
|
||||
return function(geo) {
|
||||
return geo.city + ", " + geo.country;
|
||||
};
|
||||
});
|
||||
|
||||
function peerClass(peers)
|
||||
|
||||
@@ -80,5 +80,9 @@
|
||||
console.log(data);
|
||||
});
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
$('body').on('mouseenter', '[data-toggle="tooltip"]', function( event ) {
|
||||
$(this).tooltip('show');
|
||||
}).on('mouseleave', '[data-toggle="tooltip"]', function( event ) {
|
||||
$(this).tooltip('hide');
|
||||
})
|
||||
})();
|
||||
Reference in New Issue
Block a user