compacted block hash

This commit is contained in:
cubedro 2015-02-19 19:34:20 +02:00
parent f157b1eacf
commit d74894c99d
2 changed files with 7 additions and 2 deletions

View File

@ -60,6 +60,11 @@ angular.module('netStatsApp.filters', [])
return (typeof gas !== 'undefined' ? parseInt(gas) : '?'); return (typeof gas !== 'undefined' ? parseInt(gas) : '?');
} }
}) })
.filter('hashFilter', function() {
return function(hash) {
return hash.substr(0, 6) + '...' + hash.substr(58, 6);
}
})
.filter('timeClass', function() { .filter('timeClass', function() {
return function(timestamp) { return function(timestamp) {
return timeClass(timestamp); return timeClass(timestamp);

View File

@ -89,7 +89,7 @@ block content
th th
i.icon-check-o(data-toggle="tooltip", data-placement="top", title="Block transactions") i.icon-check-o(data-toggle="tooltip", data-placement="top", title="Block transactions")
th 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 th
i.icon-clock(data-toggle="tooltip", data-placement="top", title="Up-time") i.icon-clock(data-toggle="tooltip", data-placement="top", title="Up-time")
tbody tbody
@ -106,7 +106,7 @@ block content
td(style="padding-left: 18px;") {{node.stats.pending}} 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 }}") {{'#' + node.stats.block.number}}
td(class="{{ node.stats.block.number | blockClass : bestBlock }}").hidden-sm.hidden-xs 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}} //- 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(style="padding-left: 18px;") {{node.stats.block.txCount}}
td(class="{{ node.stats.block.timestamp | timeClass }}") {{node.stats.block.timestamp | blockTimeFilter }} td(class="{{ node.stats.block.timestamp | timeClass }}") {{node.stats.block.timestamp | blockTimeFilter }}