diff --git a/dist/index-lite.html b/dist/index-lite.html index 7a8feca..e82ee32 100644 --- a/dist/index-lite.html +++ b/dist/index-lite.html @@ -1 +1 @@ -Ethereum Network Status
best block{{'#'}}{{ bestBlock | number}}
uncles (current / last 50){{ bestStats.block.uncles.length }}/{{ uncleCount }}
last block{{ lastBlock | blockTimeFilter }}
avg block time{{ avgBlockTime | avgTimeFilter }}
avg network hashrate
difficulty{{ lastDifficulty | number }}
active nodes{{nodesActive}}/{{nodesTotal}}
nodes status{{ nodes | consensusFilter : bestStats }}
page latency{{latency}} ms
uptime{{ upTimeTotal | upTimeFilter }}
 
{{node.info.name}} ({{node.info.ip}})
{{ node.readable.latency }}{{node.stats.peers}}{{node.stats.pending}}{{'#'}}{{ node.stats.block.number | number }}{{node.stats.block.hash | hashFilter}}{{node.stats.block.totalDifficulty | number}}{{node.stats.block.transactions.length || 0}}{{node.stats.block.uncles.length || 0}}{{node.stats.block.received | blockTimeFilter }}
{{node.stats.block.propagation | blockPropagationFilter}}
{{ node.stats | blockPropagationAvgFilter : bestBlock }}{{ node.stats.uptime | upTimeFilter }}
\ No newline at end of file +Ethereum Network Status
best block{{'#'}}{{ bestBlock | number}}
uncles (current / last 50){{ bestStats.block.uncles.length }}/{{ uncleCount }}
last block{{ lastBlock | blockTimeFilter }}
avg block time{{ avgBlockTime | avgTimeFilter }}
avg network hashrate
difficulty{{ lastDifficulty | number }}
active nodes{{nodesActive}}/{{nodesTotal}}
nodes status{{ nodes | consensusFilter : bestStats }}
page latency{{latency}} ms
 
{{node.info.name}} ({{node.info.ip}})
{{ node.readable.latency }}{{'#'}}{{ node.stats.block.number | number }}{{node.stats.block.hash | hashFilter}}{{node.stats.block.totalDifficulty | number}}{{node.stats.block.received | blockTimeFilter }}
{{node.stats.block.propagation | blockPropagationFilter}}
\ No newline at end of file diff --git a/lib/history.js b/lib/history.js index 6b19cc4..621a8bc 100644 --- a/lib/history.js +++ b/lib/history.js @@ -23,6 +23,7 @@ History.prototype.add = function(block, id, trusted, addingHistory) if( !_.isUndefined(block) && !_.isUndefined(block.number) && !_.isUndefined(block.uncles) && !_.isUndefined(block.transactions) && !_.isUndefined(block.difficulty) && block.number > 0 ) { + trusted = (process.env.LITE === true ? true : trusted); var historyBlock = this.search(block.number); var forkIndex = -1; diff --git a/lib/node.js b/lib/node.js index 726e79b..c412124 100644 --- a/lib/node.js +++ b/lib/node.js @@ -81,7 +81,7 @@ Node.prototype.setInfo = function(data, callback) if( !_.isUndefined(data.ip) ) { - if( trusted.indexOf(data.ip) >= 0 ) + if( trusted.indexOf(data.ip) >= 0 || process.env.LITE === true) { this.trusted = true; } diff --git a/src/views/index-lite.jade b/src/views/index-lite.jade index dcdbffb..8433a7f 100644 --- a/src/views/index-lite.jade +++ b/src/views/index-lite.jade @@ -60,70 +60,21 @@ block content div.row(ng-cloak) div.col-xs-12.stats-boxes(style="padding-top: 0px;") div.row.second-row - div.col-xs-3.stat-holder.box + div.col-xs-4.stat-holder.box div.active-nodes(class="{{ nodesActive | nodesActiveClass : nodesTotal }}") i.icon-node span.small-title active nodes span.small-value {{nodesActive}}/{{nodesTotal}} - div.col-xs-3.stat-holder.box + div.col-xs-4.stat-holder.box div.gasprice(class="{{ nodes | consensusClass : bestStats }}") i.icon-check-o span.small-title nodes status span.small-value {{ nodes | consensusFilter : bestStats }} - div.col-xs-3.stat-holder.box + div.col-xs-4.stat-holder.box div.page-latency(class="{{ {active: true, latency: latency} | latencyClass }}") i.icon-clock span.small-title page latency span.small-value {{latency}} ms - div.col-xs-3.stat-holder.box - div.uptime(class="{{ upTimeTotal | upTimeClass : true }}") - i.icon-bulb - span.small-title uptime - span.small-value {{ upTimeTotal | upTimeFilter }} - - //- div.row - div.col-xs-3.stat-holder - div.big-info.chart(class="{{ avgBlockTime | avgTimeClass }}") - span.small-title block time - sparkchart.big-details.spark-blocktimes(data="{{lastBlocksTime.join(',')}}", tooltipsuffix="s") - - div.col-xs-3.stat-holder - div.big-info.chart.text-info - span.small-title difficulty - sparkchart.big-details.spark-difficulty(data="{{difficultyChart.join(',')}}") - - div.col-xs-3.stat-holder.xpull-right - div.big-info.chart.xdouble-chart(class="{{ blockPropagationAvg | propagationAvgTimeClass : true }}") - span.small-title block propagation - histogram.big-details.d3-blockpropagation(data="blockPropagationChart") - - div.col-xs-3.stat-holder.pull-right - div.big-info.chart.double-chart - span.small-title last blocks miners - div.blocks-holder(ng-repeat='miner in miners track by miner.miner', data-toggle="tooltip", data-placement="right", data-original-title="{{miner.blocks}}") - div.block-count(class="{{miner.blocks | minerBlocksClass : 'text-'}}") {{miner.blocks}} - div.small-title-miner {{miner.miner}} - minerblock(blocks="{{miner.blocks}}") - div.clearfix - - div.col-xs-3.stat-holder - div.big-info.chart.text-info - span.small-title uncle count  - span.small (25 blocks per bar) - sparkchart.big-details.spark-uncles(data="{{uncleCountChart.join(',')}}") - - div.col-xs-3.stat-holder - div.big-info.chart.text-info - span.small-title transactions - sparkchart.big-details.spark-transactions(data="{{transactionDensity.join(',')}}") - - div.col-xs-3.stat-holder - div.big-info.chart.text-info - span.small-title gas spending - sparkchart.big-details.spark-gasspending(data="{{gasSpending.join(',')}}") - - //- div.col-xs-4.stat-holder.map-holder - nodemap#mapHolder(data="map") div.row(ng-cloak, style="padding-top: 10px") table.table.table-striped @@ -137,29 +88,29 @@ block content i.icon-laptop(data-toggle="tooltip", data-placement="top", title="Node type", ng-click="orderTable(['info.node'], false)") th.th-latency i.icon-clock(data-toggle="tooltip", data-placement="top", title="Node latency", ng-click="orderTable(['stats.latency'], false)") - th + //- th i.icon-mining(data-toggle="tooltip", data-placement="top", title="Is mining", ng-click="orderTable(['-stats.hashrate'], false)") - th + //- th i.icon-group(data-toggle="tooltip", data-placement="top", title="Peers", ng-click="orderTable(['-stats.peers'], false)") - th + //- th i.icon-network(data-toggle="tooltip", data-placement="top", title="Pending transactions", ng-click="orderTable(['-stats.pending'], false)") th i.icon-block(data-toggle="tooltip", data-placement="top", title="Last block", ng-click="orderTable(['-stats.block.number', 'stats.block.propagation'], false)") th.th-blockhash   th.th-blockhash i.icon-difficulty(data-toggle="tooltip", data-placement="top", title="Total difficulty", ng-click="orderTable(['-stats.block.totalDifficulty'], false)") - th + //- th i.icon-check-o(data-toggle="tooltip", data-placement="top", title="Block transactions", ng-click="orderTable(['-stats.block.transactions.length'], false)") - th + //- th i.icon-uncle(data-toggle="tooltip", data-placement="top", title="Uncles", ng-click="orderTable(['-stats.block.uncles.length'], false)") th.th-blocktime i.icon-time(data-toggle="tooltip", data-placement="top", title="Last block time", ng-click="orderTable(['-stats.block.received'], false)") th.th-peerPropagationTime i.icon-gas(data-toggle="tooltip", data-placement="top", title="Propagation time", ng-click="orderTable(['-stats.block.number', 'stats.block.propagation'], false)") - th.th-peerPropagationChart - th.th-peerPropagationAvg + //- th.th-peerPropagationChart + //- th.th-peerPropagationAvg i.icon-gas(data-toggle="tooltip", data-placement="top", title="Average propagation time", ng-click="orderTable(['stats.propagationAvg'], false)") - th + //- th i.icon-bulb(data-toggle="tooltip", data-placement="top", title="Up-time", ng-click="orderTable(['-stats.uptime'], false)") tbody(ng-cloak) tr(ng-repeat='node in nodes | orderBy:predicate track by node.id', class="{{ node.stats | mainClass : bestBlock }}", id="node_{{node.id}}") @@ -174,9 +125,9 @@ 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.peers | peerClass : node.stats.active }}", style="padding-left: 11px;") {{node.stats.peers}} - td(style="padding-left: 15px;") {{node.stats.pending}} + //- td(class="{{ node.stats.mining | hashrateClass : node.stats.active }}", ng-bind-html="node.stats.hashrate | hashrateFilter : 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 }}") span(class="{{ node.readable.forkMessage ? node.readable.forkClass : '' }}") {{'#'}}{{ node.stats.block.number | number }} a.small(data-toggle="tooltip", data-placement="top", data-html="true", data-original-title="{{ node.readable.forkMessage }}", class="{{ node.readable.forkClass }}") @@ -185,13 +136,13 @@ block content span.small {{node.stats.block.hash | hashFilter}} td(class="{{ node.stats | blockClass : bestBlock }}") span.small {{node.stats.block.totalDifficulty | number}} - td(style="padding-left: 14px;") {{node.stats.block.transactions.length || 0}} - td(style="padding-left: 14px;") {{node.stats.block.uncles.length || 0}} + //- td(style="padding-left: 14px;") {{node.stats.block.transactions.length || 0}} + //- td(style="padding-left: 14px;") {{node.stats.block.uncles.length || 0}} td(class="{{ node.stats.block.received | timeClass : node.stats.active }}") {{node.stats.block.received | blockTimeFilter }} td(class="{{ node.stats | propagationTimeClass : bestBlock }}") div.propagationBox span {{node.stats.block.propagation | blockPropagationFilter}} - td.peerPropagationChart(class="{{node.id}}") + //- td.peerPropagationChart(class="{{node.id}}") nodepropagchart(data="{{node.history.join(',')}}") - td(class="{{ node.stats | propagationNodeAvgTimeClass : bestBlock }}") {{ node.stats | blockPropagationAvgFilter : bestBlock }} - td(class="{{ node.stats.uptime | upTimeClass : node.stats.active }}") {{ node.stats.uptime | upTimeFilter }} + //- td(class="{{ node.stats | propagationNodeAvgTimeClass : bestBlock }}") {{ node.stats | blockPropagationAvgFilter : bestBlock }} + //- td(class="{{ node.stats.uptime | upTimeClass : node.stats.active }}") {{ node.stats.uptime | upTimeFilter }}