node version filter

pull/5/head
cubedro 10 years ago
parent 3b3cde669e
commit 71c24b3e6a
  1. 5
      public/js/filters.js
  2. 2
      views/index.jade

@ -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'));

@ -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 }}")

Loading…
Cancel
Save