diff --git a/public/css/style.css b/public/css/style.css index 1d0cb1d..1eab0d1 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -184,7 +184,7 @@ div.small-title-miner { .page-latency { position: absolute; - top: 400px; + top: 395px; left: 15px; } @@ -239,7 +239,7 @@ table td.peerPropagationChart { } .th-nodetype { - width: 200px; + width: 220px; } .th-latency { diff --git a/public/js/filters.js b/public/js/filters.js index d5f42e7..2116985 100644 --- a/public/js/filters.js +++ b/public/js/filters.js @@ -42,6 +42,22 @@ angular.module('netStatsApp.filters', []) 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) { return function(version) { if(typeof version !== 'undefined') diff --git a/views/index.jade b/views/index.jade index 26bfa66..16e094a 100644 --- a/views/index.jade +++ b/views/index.jade @@ -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)") th 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 i.icon-group(data-toggle="tooltip", data-placement="top", title="Peers", ng-click="orderTable(['-stats.active', '-stats.peers'], false)") th @@ -143,6 +145,7 @@ block content td.small(class="{{ node.stats | latencyClass }}") {{node.stats | latencyFilter}} td(class="{{ node.stats.mining | miningClass : node.stats.active }}") 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(style="padding-left: 15px;") {{node.stats.pending}} td(class="{{ node.stats | blockClass : bestBlock }}") {{'#'}}{{ node.stats.block.number | number }}