diff --git a/public/js/filters.js b/public/js/filters.js index 658f6e2..2ba0a9a 100644 --- a/public/js/filters.js +++ b/public/js/filters.js @@ -60,6 +60,11 @@ angular.module('netStatsApp.filters', []) return (typeof gas !== 'undefined' ? parseInt(gas) : '?'); } }) +.filter('hashFilter', function() { + return function(hash) { + return hash.substr(0, 6) + '...' + hash.substr(58, 6); + } +}) .filter('timeClass', function() { return function(timestamp) { return timeClass(timestamp); diff --git a/views/index.jade b/views/index.jade index 04cd27a..cb818e3 100644 --- a/views/index.jade +++ b/views/index.jade @@ -89,7 +89,7 @@ block content th i.icon-check-o(data-toggle="tooltip", data-placement="top", title="Block transactions") th - i.icon-time(data-toggle="tooltip", data-placement="top", title="Last node time") + i.icon-time(data-toggle="tooltip", data-placement="top", title="Last block time") th i.icon-clock(data-toggle="tooltip", data-placement="top", title="Up-time") tbody @@ -106,7 +106,7 @@ block content td(style="padding-left: 18px;") {{node.stats.pending}} 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}} + span.small {{node.stats.block.hash | hashFilter}} //- 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(style="padding-left: 18px;") {{node.stats.block.txCount}} td(class="{{ node.stats.block.timestamp | timeClass }}") {{node.stats.block.timestamp | blockTimeFilter }}