X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=web-static%2Findex.html;h=bf5c02f0f59ac922e1a18d700da2e314e1b4bc04;hb=42ef9915e550d633cea6407b9affd2e85ec9d556;hp=e37d732328add8b3ad2dede631bb873a04a0b6e2;hpb=601999e5f2ffea82f5dedb6f7a18071b62bf7e27;p=p2pool.git diff --git a/web-static/index.html b/web-static/index.html index e37d732..bf5c02f 100644 --- a/web-static/index.html +++ b/web-static/index.html @@ -10,12 +10,6 @@ function values(o){ res = []; for(var x in o) res.push(o[x]); return res; } - d3.json('/global_stats', function(global_stats) { - d3.select('#pool_rate').text(d3.format('.3s')(global_stats.pool_hash_rate) + 'H/s'); - d3.select('#pool_stale').text(d3.format('.2p')(global_stats.pool_stale_prop)); - d3.select('#difficulty').text(d3.format('.3r')(global_stats.min_difficulty)); - }); - d3.json('/local_stats', function(local_stats) { d3.select('#peers_in').text(local_stats.peers.incoming); d3.select('#peers_out').text(local_stats.peers.outgoing); @@ -36,6 +30,20 @@ d3.select('#warnings').selectAll().data(local_stats.warnings).enter().append('p') .text(function(w){ return 'Warning: ' + w }) .attr('style', 'color:red;border:1px solid red;padding:5px'); + + var time_to_share = local_stats.attempts_to_share/local; + d3.select('#time_to_share').text(d3.format('.3r')(time_to_share/3600) + " hours"); + + d3.json('/global_stats', function(global_stats) { + d3.select('#pool_rate').text(d3.format('.3s')(global_stats.pool_hash_rate) + 'H/s'); + d3.select('#pool_stale').text(d3.format('.2p')(global_stats.pool_stale_prop)); + d3.select('#difficulty').text(d3.format('.3r')(global_stats.min_difficulty)); + + var time_to_block = local_stats.attempts_to_block/global_stats.pool_hash_rate; + d3.select('#time_to_block').text(d3.format('.3r')(time_to_block/3600) + " hours"); + + d3.select('#expected_payout_amount').text(d3.format('.3r')(local/global_stats.pool_hash_rate*local_stats.block_value)); + }); }); d3.json('/web/version', function(version) { @@ -91,10 +99,10 @@

Version:

Pool rate: ( stale) Share difficulty:

Node uptime: days Peers: out, in

-

Local rate: ( DOA)

+

Local rate: ( DOA) Expected time to share:

Shares: total ( orphaned, dead) Efficiency:

-

Payout if a block were found NOW: to

-

Current block value:

+

Payout if a block were found NOW: to . Expected:

+

Current block value: Expected time to block:

Share explorer