node version filter

This commit is contained in:
cubedro 2015-02-17 16:07:50 +02:00
parent 3b3cde669e
commit 71c24b3e6a
2 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,11 @@ angular.module('netStatsApp.filters', [])
return (! mining ? 'icon-cancel' : 'icon-check');
};
})
.filter('nodeVersion', function() {
return function(version) {
return version.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br>' + '$2')
}
})
.filter('blockClass', function() {
return function(current, best) {
return (best - current <= 1 ? 'text-success' : (best - current > 1 && best - current < 4 ? 'text-warning' : 'text-danger'));

View File

@ -77,7 +77,7 @@ block content
td(rel="{{node.id}}")
span(data-toggle="tooltip", data-placement="top", data-original-title="{{node.geo | geoTooltip}}") {{node.info.name}}
div.small {{node.info.ip}}
td {{node.info.node}}
td.small {{ 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 }}")