merged master
This commit is contained in:
commit
95ce5488f1
@ -93,6 +93,39 @@ angular.module('netStatsApp.filters', [])
|
||||
return $sce.trustAsHtml('<span class="small">' + filter('number')(result.toFixed(1)) + ' <span class="small-hash">' + unit + 'H/s</span></span>');
|
||||
};
|
||||
}])
|
||||
.filter('totalDifficultyFilter', function() {
|
||||
return function(hashes) {
|
||||
var result = 0;
|
||||
var unit = '';
|
||||
|
||||
if(hashes !== 0 && hashes < 1000) {
|
||||
result = hashes;
|
||||
unit = '';
|
||||
}
|
||||
|
||||
if(hashes >= 1000 && hashes < Math.pow(1000, 2)) {
|
||||
result = hashes / 1000;
|
||||
unit = 'K';
|
||||
}
|
||||
|
||||
if(hashes >= Math.pow(1000, 2) && hashes < Math.pow(1000, 3)) {
|
||||
result = hashes / Math.pow(1000, 2);
|
||||
unit = 'M';
|
||||
}
|
||||
|
||||
if(hashes >= Math.pow(1000, 3) && hashes < Math.pow(1000, 4)) {
|
||||
result = hashes / Math.pow(1000, 3);
|
||||
unit = 'G';
|
||||
}
|
||||
|
||||
if(hashes >= Math.pow(1000, 4) && hashes < Math.pow(1000, 5)) {
|
||||
result = hashes / Math.pow(1000, 4);
|
||||
unit = 'T';
|
||||
}
|
||||
|
||||
return result.toFixed(2) + ' ' + unit + 'H';
|
||||
};
|
||||
})
|
||||
.filter('nodeVersion', function($sce) {
|
||||
return function(version) {
|
||||
if(typeof version !== 'undefined')
|
||||
|
@ -53,7 +53,7 @@ block content
|
||||
div.big-details-holder
|
||||
span.small-title difficulty
|
||||
span.big-details
|
||||
span.small-hash {{ lastDifficulty | number }}
|
||||
span.small-hash {{ lastDifficulty | totalDifficultyFilter }}
|
||||
div.clearfix
|
||||
|
||||
div.clearfix
|
||||
@ -156,7 +156,6 @@ block content
|
||||
//- div.col-xs-12
|
||||
nodemap#mapHolder(data="map")
|
||||
|
||||
|
||||
div.row
|
||||
div.col-xs-3.stat-holder
|
||||
div.big-info.chart.text-info
|
||||
|
Loading…
Reference in New Issue
Block a user