added hashrate

This commit is contained in:
cubedro 2015-04-24 01:38:09 +03:00
parent dfaed30cab
commit 927794469a
3 changed files with 21 additions and 2 deletions

View File

@ -184,7 +184,7 @@ div.small-title-miner {
.page-latency { .page-latency {
position: absolute; position: absolute;
top: 400px; top: 395px;
left: 15px; left: 15px;
} }
@ -239,7 +239,7 @@ table td.peerPropagationChart {
} }
.th-nodetype { .th-nodetype {
width: 200px; width: 220px;
} }
.th-latency { .th-latency {

View File

@ -42,6 +42,22 @@ angular.module('netStatsApp.filters', [])
return (! mining ? 'icon-cancel' : 'icon-check'); return (! mining ? 'icon-cancel' : 'icon-check');
}; };
}) })
.filter('hashpowerClass', function() {
return function(mining) {
if(! mining)
return 'text-gray';
return 'text-success';
};
})
.filter('hashrateFilter', function() {
return function(hashrate) {
if(typeof hashrate === 'undefined' || !hashrate)
return 0;
return hashrate/1000;
}
})
.filter('nodeVersion', function($sce) { .filter('nodeVersion', function($sce) {
return function(version) { return function(version) {
if(typeof version !== 'undefined') if(typeof version !== 'undefined')

View File

@ -116,6 +116,8 @@ block content
i.icon-clock(data-toggle="tooltip", data-placement="top", title="Node latency", ng-click="orderTable(['-stats.active', 'stats.latency'], false)") i.icon-clock(data-toggle="tooltip", data-placement="top", title="Node latency", ng-click="orderTable(['-stats.active', 'stats.latency'], false)")
th th
i.icon-mining(data-toggle="tooltip", data-placement="top", title="Is mining", ng-click="orderTable(['-stats.active', '-stats.mining'], false)") i.icon-mining(data-toggle="tooltip", data-placement="top", title="Is mining", ng-click="orderTable(['-stats.active', '-stats.mining'], false)")
th
i.icon-mining(data-toggle="tooltip", data-placement="top", title="Hashrate", ng-click="orderTable(['-stats.active', '-stats.mining'], false)")
th th
i.icon-group(data-toggle="tooltip", data-placement="top", title="Peers", ng-click="orderTable(['-stats.active', '-stats.peers'], false)") i.icon-group(data-toggle="tooltip", data-placement="top", title="Peers", ng-click="orderTable(['-stats.active', '-stats.peers'], false)")
th th
@ -143,6 +145,7 @@ block content
td.small(class="{{ node.stats | latencyClass }}") {{node.stats | latencyFilter}} td.small(class="{{ node.stats | latencyClass }}") {{node.stats | latencyFilter}}
td(class="{{ node.stats.mining | miningClass : node.stats.active }}") td(class="{{ node.stats.mining | miningClass : node.stats.active }}")
i(class="{{ node.stats.mining | miningIconClass }}") i(class="{{ node.stats.mining | miningIconClass }}")
td.small(class="{{ node.stats.mining | hashpowerClass }}") {{node.stats.hashrate | hashrateFilter}} kH/s
td(class="{{ node.stats.peers | peerClass : node.stats.active }}", style="padding-left: 11px;") {{node.stats.peers}} td(class="{{ node.stats.peers | peerClass : node.stats.active }}", style="padding-left: 11px;") {{node.stats.peers}}
td(style="padding-left: 15px;") {{node.stats.pending}} td(style="padding-left: 15px;") {{node.stats.pending}}
td(class="{{ node.stats | blockClass : bestBlock }}") {{'#'}}{{ node.stats.block.number | number }} td(class="{{ node.stats | blockClass : bestBlock }}") {{'#'}}{{ node.stats.block.number | number }}