added miner name

This commit is contained in:
cubedro 2015-04-06 21:10:27 +03:00
parent 7bf616f6b8
commit 11008d51ee
2 changed files with 6 additions and 3 deletions

View File

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

View File

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