pull/5/head
Marian Oancea 10 years ago
parent 1708636d85
commit 7632de1f40
  1. 5
      public/js/filters.js
  2. 2
      views/index.jade

@ -44,6 +44,11 @@ angular.module('netStatsApp.filters', [])
return (best - current <= 1 ? 'text-success' : (best - current > 1 && best - current < 4 ? 'text-warning' : 'text-danger'));
};
})
.filter('gasFilter', function() {
return function(gas) {
return (typeof gas !== 'undefined' ? parseInt(gas) : '?');
}
})
.filter('timeClass', function() {
return function(timestamp) {
return timeClass(timestamp);

@ -85,6 +85,6 @@ block content
td(class="{{ node.stats.block.number | blockClass : bestBlock }}") {{'#' + node.stats.block.number}}
td(class="{{ node.stats.block.number | blockClass : bestBlock }}").hidden-sm.hidden-xs
span.small {{node.stats.block.hash}}
div.small Difficulty: {{node.stats.block.difficulty}}
div.small Difficulty: {{node.stats.block.difficulty | gasFilter}} | Gas used: {{node.stats.block.gasUsed | gasFilter}} | Min gas price: {{node.stats.block.minGasPrice | gasFilter}} | Gas limit: {{node.stats.block.gasLimit | gasFilter}}
td(am-time-ago="node.stats.block.timestamp", am-preprocess="unix", class="{{ node.stats.block.timestamp | timeClass }}") ∞
td(class="{{ node.stats.uptime.total | upTimeClass }}") {{ node.stats.uptime.total | upTimeFilter }}

Loading…
Cancel
Save