node version filter
This commit is contained in:
parent
3b3cde669e
commit
71c24b3e6a
@ -39,6 +39,11 @@ angular.module('netStatsApp.filters', [])
|
|||||||
return (! mining ? 'icon-cancel' : 'icon-check');
|
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() {
|
.filter('blockClass', function() {
|
||||||
return function(current, best) {
|
return function(current, best) {
|
||||||
return (best - current <= 1 ? 'text-success' : (best - current > 1 && best - current < 4 ? 'text-warning' : 'text-danger'));
|
return (best - current <= 1 ? 'text-success' : (best - current > 1 && best - current < 4 ? 'text-warning' : 'text-danger'));
|
||||||
|
@ -77,7 +77,7 @@ block content
|
|||||||
td(rel="{{node.id}}")
|
td(rel="{{node.id}}")
|
||||||
span(data-toggle="tooltip", data-placement="top", data-original-title="{{node.geo | geoTooltip}}") {{node.info.name}}
|
span(data-toggle="tooltip", data-placement="top", data-original-title="{{node.geo | geoTooltip}}") {{node.info.name}}
|
||||||
div.small {{node.info.ip}}
|
div.small {{node.info.ip}}
|
||||||
td {{node.info.node}}
|
td.small {{ node.info.node | nodeVersion }}
|
||||||
div.small {{node.info.os}}, {{node.info.os_v}}
|
div.small {{node.info.os}}, {{node.info.os_v}}
|
||||||
td(class="{{ node.stats.peers | peerClass }}") {{node.stats.peers}}
|
td(class="{{ node.stats.peers | peerClass }}") {{node.stats.peers}}
|
||||||
td(class="{{ node.stats.mining | miningClass }}")
|
td(class="{{ node.stats.mining | miningClass }}")
|
||||||
|
Loading…
Reference in New Issue
Block a user