node version parser
This commit is contained in:
parent
35072afb90
commit
9f93f7059b
@ -39,10 +39,14 @@ angular.module('netStatsApp.filters', [])
|
||||
return (! mining ? 'icon-cancel' : 'icon-check');
|
||||
};
|
||||
})
|
||||
.filter('nodeVersion', function() {
|
||||
.filter('nodeVersion', function($sce) {
|
||||
return function(version) {
|
||||
return version.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br>' + '$2')
|
||||
}
|
||||
version = version.replace('eth version ', 'v')
|
||||
.replace("\n" + 'Network protocol version: ', ' (')
|
||||
.replace("\n" + 'Client database version: ', ',')
|
||||
.replace("\n" + 'Build: ', ')<br>');
|
||||
return $sce.trustAsHtml(version);
|
||||
};
|
||||
})
|
||||
.filter('blockClass', function() {
|
||||
return function(current, best) {
|
||||
|
@ -78,7 +78,7 @@ block content
|
||||
span(data-toggle="tooltip", data-placement="top", data-original-title="{{node.geo | geoTooltip}}") {{node.info.name}}
|
||||
div.small {{node.info.ip}}
|
||||
td.small
|
||||
span(ng-bind-html-unsafe="node.info.node | nodeVersion")
|
||||
div.small(ng-bind-html="node.info.node | nodeVersion")
|
||||
div.small {{node.info.os}}, {{node.info.os_v}}
|
||||
td(class="{{ node.stats.peers | peerClass }}") {{node.stats.peers}}
|
||||
td(class="{{ node.stats.mining | miningClass }}")
|
||||
|
Loading…
Reference in New Issue
Block a user