added client version check and advise

This commit is contained in:
cubedro
2015-04-28 04:25:49 +03:00
parent c9dde35e09
commit 604f7e99a6
3 changed files with 15 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
$scope.latency = 0;
$scope.currentApiVersion = "0.0.5";
$scope.predicate = ['-stats.active', '-stats.block.number', 'stats.block.propagation'];
$scope.reverse = false;

View File

@@ -371,6 +371,17 @@ angular.module('netStatsApp.filters', [])
return prefix + 'danger';
};
})
.filter('nodeClientClass', function() {
return function(info, current) {
if(typeof info === 'undefined' || typeof info.client === 'undefined' || typeof info.client === '')
return 'text-danger';
if(current.localeCompare(info.client) > 0)
return 'text-warning';
return 'hidden';
};
});
function mainClass(node, bestBlock)