fixed totalDifficultyFilter, fixed gaslimit number format

This commit is contained in:
hackyminer 2018-06-25 09:29:34 +09:00 committed by EOS Classic
parent 815f62f3a8
commit 5f786d8a2b
No known key found for this signature in database
GPG Key ID: 0D626A44301D8C5E
2 changed files with 5 additions and 6 deletions

View File

@ -75,7 +75,7 @@ angular.module('netStatsApp.filters', [])
return $sce.trustAsHtml('<span class="small">' + filter('number')(result.toFixed(1)) + ' <span class="small-hash">' + unit + 'H/s</span></span>'); return $sce.trustAsHtml('<span class="small">' + filter('number')(result.toFixed(1)) + ' <span class="small-hash">' + unit + 'H/s</span></span>');
}; };
}]) }])
.filter('totalDifficultyFilter', function() { .filter('totalDifficultyFilter', ['$sce', '$filter', function($sce, filter) {
return function(hashes) { return function(hashes) {
var result = hashes; var result = hashes;
var units = ['', 'K', 'M', 'G', 'T', 'P']; var units = ['', 'K', 'M', 'G', 'T', 'P'];
@ -87,9 +87,9 @@ angular.module('netStatsApp.filters', [])
unit = units[i]; unit = units[i];
} }
return result.toFixed(2) + ' ' + unit + 'H'; return $sce.trustAsHtml(filter('number')(result.toFixed(2)) + ' <span class="small-hash">' + unit + 'H</span>');
}; };
}) }])
.filter('nodeVersion', function($sce) { .filter('nodeVersion', function($sce) {
return function(version) { return function(version) {
if(version) if(version)

View File

@ -55,8 +55,7 @@ block content
i.icon-difficulty i.icon-difficulty
div.big-details-holder div.big-details-holder
span.small-title difficulty span.small-title difficulty
span.big-details span.big-details(ng-bind-html="lastDifficulty | totalDifficultyFilter")
span.small-hash {{ lastDifficulty | totalDifficultyFilter }}
div.clearfix div.clearfix
div.clearfix div.clearfix
@ -79,7 +78,7 @@ block content
div.gasprice.text-info div.gasprice.text-info
i.icon-gasprice i.icon-gasprice
span.small-title gas limit span.small-title gas limit
span.small-value {{ bestStats.block.gasLimit }} gas span.small-value {{ bestStats.block.gasLimit | number }} gas
div.col-xs-6.col-sm-6.col-md-6.col-lg-2.stat-holder.box div.col-xs-6.col-sm-6.col-md-6.col-lg-2.stat-holder.box
div.page-latency(class="{{ {active: true, latency: latency} | latencyClass }}") div.page-latency(class="{{ {active: true, latency: latency} | latencyClass }}")
i.icon-clock i.icon-clock