added node latency
This commit is contained in:
@@ -60,6 +60,14 @@ angular.module('netStatsApp.filters', [])
|
||||
return (typeof gas !== 'undefined' ? parseInt(gas) : '?');
|
||||
}
|
||||
})
|
||||
.filter('latencyFilter', function() {
|
||||
return function(stats) {
|
||||
if(stats.active === false)
|
||||
return 'offline';
|
||||
else
|
||||
return stats.latency + ' ms';
|
||||
}
|
||||
})
|
||||
.filter('hashFilter', function() {
|
||||
return function(hash) {
|
||||
return hash.substr(0, 6) + '...' + hash.substr(58, 6);
|
||||
@@ -79,7 +87,7 @@ angular.module('netStatsApp.filters', [])
|
||||
var diff = time - timestamp;
|
||||
|
||||
if(diff < 60)
|
||||
return Math.round(diff) + ' s';
|
||||
return Math.round(diff) + ' s ago';
|
||||
|
||||
return moment.duration(Math.round(diff), 's').humanize() + ' ago';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user