Merge pull request #104 from cubedro/develop
Added client version check and advise
This commit is contained in:
commit
0f3ebd8b11
@ -32,6 +32,8 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
|||||||
|
|
||||||
$scope.latency = 0;
|
$scope.latency = 0;
|
||||||
|
|
||||||
|
$scope.currentApiVersion = "0.0.5";
|
||||||
|
|
||||||
$scope.predicate = ['-stats.active', '-stats.block.number', 'stats.block.propagation'];
|
$scope.predicate = ['-stats.active', '-stats.block.number', 'stats.block.propagation'];
|
||||||
$scope.reverse = false;
|
$scope.reverse = false;
|
||||||
|
|
||||||
|
@ -371,6 +371,17 @@ angular.module('netStatsApp.filters', [])
|
|||||||
|
|
||||||
return prefix + 'danger';
|
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)
|
function mainClass(node, bestBlock)
|
||||||
|
@ -178,6 +178,8 @@ block content
|
|||||||
td.nodeInfo(rel="{{node.id}}")
|
td.nodeInfo(rel="{{node.id}}")
|
||||||
span.small(data-toggle="tooltip", data-placement="top", data-html="true", data-original-title="{{node | geoTooltip}}") {{node.info.name}}
|
span.small(data-toggle="tooltip", data-placement="top", data-html="true", data-original-title="{{node | geoTooltip}}") {{node.info.name}}
|
||||||
span.small #[ ]({{node.info.ip}})
|
span.small #[ ]({{node.info.ip}})
|
||||||
|
span.small(data-toggle="tooltip", data-placement="top", data-html="true", data-original-title="Netstats client needs update", class="{{ node.info | nodeClientClass : currentApiVersion }}")
|
||||||
|
i.icon-warning-o
|
||||||
td
|
td
|
||||||
div.small(ng-bind-html="node.info.node | nodeVersion")
|
div.small(ng-bind-html="node.info.node | nodeVersion")
|
||||||
td(class="{{ node.stats | latencyClass }}")
|
td(class="{{ node.stats | latencyClass }}")
|
||||||
|
Loading…
Reference in New Issue
Block a user