added miner name

pull/5/head
cubedro 10 years ago
parent 7bf616f6b8
commit 11008d51ee
  1. 7
      public/js/filters.js
  2. 2
      views/index.jade

@ -201,8 +201,11 @@ angular.module('netStatsApp.filters', [])
};
})
.filter('minerNameFilter', function() {
return function(name) {
return name.replace('0x', '');
return function(address, name) {
if(typeof name !== 'undefined' && name !== false && name.length > 0)
return name;
return address.replace('0x', '');
};
})
.filter('minerBlocksClass', function() {

@ -87,7 +87,7 @@ block content
span.small-title last blocks miners
div.blocks-holder(ng-repeat='miner in miners', data-toggle="tooltip", data-placement="right", title="{{miner.blocks}}")
div.block-count ({{miner.blocks}})
div.small-title-miner {{miner.miner | minerNameFilter}}
div.small-title-miner {{miner.miner | minerNameFilter : miner.name}}
div.block(ng-repeat="i in getNumber(miner.blocks) track by $index", class="{{miner.blocks | minerBlocksClass}}")
div.clearfix

Loading…
Cancel
Save