added peer propagation chart
This commit is contained in:
@@ -229,6 +229,10 @@ table td {
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.th-peerPropagationChart {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 639px) {
|
||||
/*.big-info {
|
||||
padding-bottom: 15px;
|
||||
|
||||
@@ -103,7 +103,18 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
break;
|
||||
|
||||
case "update":
|
||||
$scope.nodes[findIndex({id: data.id})].stats = data.stats;
|
||||
var index = findIndex({id: data.id});
|
||||
$scope.nodes[index].stats = data.stats;
|
||||
$scope.nodes[index].history = data.history;
|
||||
$scope.nodes[index].propagation = _.map(data.history, function(block) {
|
||||
return block.propagation;
|
||||
});
|
||||
jQuery('.' + data.id).sparkline($scope.nodes[index].propagation, {
|
||||
type: 'bar',
|
||||
height: 20,
|
||||
barWidth : 2,
|
||||
barSpacing : 1,
|
||||
});
|
||||
break;
|
||||
|
||||
case "info":
|
||||
@@ -143,6 +154,10 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
}
|
||||
|
||||
$scope.nodes[index] = data;
|
||||
$scope.nodes[index].history = data.history;
|
||||
$scope.nodes[index].propagation = _.map(data.history, function(block) {
|
||||
return block.propagation;
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -211,8 +226,6 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
longitude: 0
|
||||
};
|
||||
});
|
||||
|
||||
// console.log($scope.map);
|
||||
}
|
||||
|
||||
$scope.$apply();
|
||||
|
||||
@@ -71,7 +71,6 @@ angular.module('netStatsApp.filters', [])
|
||||
})
|
||||
.filter('timeClass', function() {
|
||||
return function(timestamp) {
|
||||
console.log(timestamp);
|
||||
return timeClass(timestamp);
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user