From 95b35698d8b88391b1075dfd8cf93cc9b4087097 Mon Sep 17 00:00:00 2001 From: Peter Grassberger Date: Mon, 18 Feb 2019 20:16:02 +0100 Subject: [PATCH] poa: show staking check icon instead of non existent hashrate --- src/js/filters.js | 7 +++++++ src/views/index.jade | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/js/filters.js b/src/js/filters.js index ce3e849..fdbced8 100644 --- a/src/js/filters.js +++ b/src/js/filters.js @@ -75,6 +75,13 @@ angular.module('netStatsApp.filters', []) return $sce.trustAsHtml('' + filter('number')(result.toFixed(1)) + ' ' + unit + 'H/s'); }; }]) +.filter('stakingFilter', ['$sce', '$filter', function($sce, filter) { + return function(hashes, isMining) { + if( !isMining ) + return $sce.trustAsHtml(''); + return $sce.trustAsHtml(''); + }; +}]) .filter('totalDifficultyFilter', function() { return function(hashes) { var result = hashes; diff --git a/src/views/index.jade b/src/views/index.jade index 5c03039..166121c 100644 --- a/src/views/index.jade +++ b/src/views/index.jade @@ -110,7 +110,7 @@ block content th.th-latency i.icon-clock(data-toggle="tooltip", data-placement="top", title="Node latency", ng-click="orderTable(['stats.latency'], false)") th - i.icon-mining(data-toggle="tooltip", data-placement="top", title="Is mining", ng-click="orderTable(['-stats.hashrate'], false)") + i.icon-mining(data-toggle="tooltip", data-placement="top", title="Is staking", ng-click="orderTable(['-stats.hashrate'], false)") th i.icon-group(data-toggle="tooltip", data-placement="top", title="Peers", ng-click="orderTable(['-stats.peers'], false)") th @@ -146,7 +146,7 @@ block content div.small(ng-bind-html="node.info.node | nodeVersion") td(class="{{ node.readable.latencyClass }}") span.small {{ node.readable.latency }} - td(class="{{ node.stats.mining | hashrateClass : node.stats.active }}", ng-bind-html="node.stats.hashrate | hashrateFilter : node.stats.mining") + td(class="{{ node.stats.mining | hashrateClass : node.stats.active }}", ng-bind-html="node.stats.hashrate | stakingFilter : node.stats.mining") 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 }}")