From dd9aac60417a628db3bdb7001f65db4f993d9da6 Mon Sep 17 00:00:00 2001 From: Jethro Grassie Date: Sat, 4 May 2019 00:00:27 -0400 Subject: [PATCH] tidy table style --- src/pool.c | 1 + src/webui-embed.html | 10 +++++++++- src/webui.c | 4 +++- src/webui.h | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/pool.c b/src/pool.c index d5e0336..6eef879 100644 --- a/src/pool.c +++ b/src/pool.c @@ -1424,6 +1424,7 @@ rpc_on_last_block_header(const char* data, rpc_callback_t *callback) pool_stats.network_difficulty = last_block_headers[0]->difficulty; pool_stats.network_hashrate = last_block_headers[0]->difficulty / BLOCK_TIME; + pool_stats.network_height = last_block_headers[0]->height; update_pool_hr(); if (need_new_template) diff --git a/src/webui-embed.html b/src/webui-embed.html index c7f4475..b3da59d 100644 --- a/src/webui-embed.html +++ b/src/webui-embed.html @@ -15,6 +15,13 @@ table { padding-bottom: 1em; } + td { + vertical-align: top; + white-space: wrap; + } + td:last-child { + white-space: unset; + } .wallet { display: none; } @@ -25,6 +32,7 @@ + @@ -37,7 +45,7 @@ diff --git a/src/webui.c b/src/webui.c index 598a403..87deefa 100644 --- a/src/webui.c +++ b/src/webui.c @@ -70,6 +70,7 @@ send_json_stats (void *cls, struct MHD_Connection *connection) char json[JSON_MAX]; uint64_t ph = context->pool_stats->pool_hashrate; uint64_t nh = context->pool_stats->network_hashrate; + uint64_t height = context->pool_stats->network_height; uint64_t lbf = context->pool_stats->last_block_found; uint32_t pbf = context->pool_stats->pool_blocks_found; uint64_t mh = 0; @@ -84,6 +85,7 @@ send_json_stats (void *cls, struct MHD_Connection *connection) snprintf(json, JSON_MAX, "{" "\"pool_hashrate\":%"PRIu64"," "\"network_hashrate\":%"PRIu64"," + "\"network_height\":%"PRIu64"," "\"last_block_found\":%"PRIu64"," "\"pool_blocks_found\":%d," "\"payment_threshold\":%.2f," @@ -92,7 +94,7 @@ send_json_stats (void *cls, struct MHD_Connection *connection) "\"connected_miners\":%d," "\"miner_hashrate\":%"PRIu64"," "\"miner_balance\":%.8f" - "}", ph, nh, lbf, pbf, + "}", ph, nh, height, lbf, pbf, context->payment_threshold, context->pool_fee, context->pool_port, context->pool_stats->connected_miners, mh, mb); diff --git a/src/webui.h b/src/webui.h index 8065759..3ca4dee 100644 --- a/src/webui.h +++ b/src/webui.h @@ -37,6 +37,7 @@ typedef struct pool_stats_t { uint64_t network_difficulty; uint64_t network_hashrate; + uint64_t network_height; uint32_t connected_miners; uint64_t pool_hashrate; uint32_t pool_blocks_found;
Pool HR:
Network HR:
Network height:
Blocks found:
Last block found:
Payment threshold:
Miner address:
- +