mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
webui: expose pool port
This commit is contained in:
parent
538994b2d0
commit
6600567377
4 changed files with 9 additions and 0 deletions
|
@ -2424,6 +2424,7 @@ int main(int argc, char **argv)
|
||||||
uic.port = config.webui_port;
|
uic.port = config.webui_port;
|
||||||
uic.pool_stats = &pool_stats;
|
uic.pool_stats = &pool_stats;
|
||||||
uic.pool_fee = config.pool_fee;
|
uic.pool_fee = config.pool_fee;
|
||||||
|
uic.pool_port = config.pool_port;
|
||||||
uic.payment_threshold = config.payment_threshold;
|
uic.payment_threshold = config.payment_threshold;
|
||||||
start_web_ui(&uic);
|
start_web_ui(&uic);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<tr><td>Last block found: </td><td>{{LAST_BLOCK_FOUND}}</td></tr>
|
<tr><td>Last block found: </td><td>{{LAST_BLOCK_FOUND}}</td></tr>
|
||||||
<tr><td>Payment threshold: </td><td>{{PAYMENT_THRESHOLD}}</td></tr>
|
<tr><td>Payment threshold: </td><td>{{PAYMENT_THRESHOLD}}</td></tr>
|
||||||
<tr><td>Pool fee: </td><td>{{POOL_FEE}}</td></tr>
|
<tr><td>Pool fee: </td><td>{{POOL_FEE}}</td></tr>
|
||||||
|
<tr><td>Pool port: </td><td>{{POOL_PORT}}</td></tr>
|
||||||
<tr><td>Miners connected: </td><td>{{MINERS_CONNECTED}}</td></tr>
|
<tr><td>Miners connected: </td><td>{{MINERS_CONNECTED}}</td></tr>
|
||||||
<tr class="wallet"><td>Your HR: </td><td>{{MINER_HASHRATE}}</td></tr>
|
<tr class="wallet"><td>Your HR: </td><td>{{MINER_HASHRATE}}</td></tr>
|
||||||
<tr class="wallet"><td>Balance due: </td><td>{{MINER_BALANCE_DUE}}</td></tr>
|
<tr class="wallet"><td>Balance due: </td><td>{{MINER_BALANCE_DUE}}</td></tr>
|
||||||
|
|
|
@ -65,6 +65,7 @@ static char MINER_HASHRATE[] = "{{MINER_HASHRATE}}";
|
||||||
static char POOL_BLOCKS_FOUND[] = "{{POOL_BLOCKS_FOUND}}";
|
static char POOL_BLOCKS_FOUND[] = "{{POOL_BLOCKS_FOUND}}";
|
||||||
static char PAYMENT_THRESHOLD[] = "{{PAYMENT_THRESHOLD}}";
|
static char PAYMENT_THRESHOLD[] = "{{PAYMENT_THRESHOLD}}";
|
||||||
static char POOL_FEE[] = "{{POOL_FEE}}";
|
static char POOL_FEE[] = "{{POOL_FEE}}";
|
||||||
|
static char POOL_PORT[] = "{{POOL_PORT}}";
|
||||||
static char MINER_BALANCE_DUE[] = "{{MINER_BALANCE_DUE}}";
|
static char MINER_BALANCE_DUE[] = "{{MINER_BALANCE_DUE}}";
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,6 +145,11 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
|
||||||
sprintf(temp, "%.2f", context->pool_fee);
|
sprintf(temp, "%.2f", context->pool_fee);
|
||||||
memcpy(p, temp, strlen(temp));
|
memcpy(p, temp, strlen(temp));
|
||||||
|
|
||||||
|
sprintf(temp, "%d", context->pool_port);
|
||||||
|
p = strstr(page_buffer, POOL_PORT);
|
||||||
|
memset(p, ' ', strlen(POOL_PORT));
|
||||||
|
memcpy(p, temp, strlen(temp));
|
||||||
|
|
||||||
const char *wa = MHD_lookup_connection_value(connection, MHD_COOKIE_KIND, "wa");
|
const char *wa = MHD_lookup_connection_value(connection, MHD_COOKIE_KIND, "wa");
|
||||||
if (wa != NULL)
|
if (wa != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,6 +49,7 @@ typedef struct wui_context_t
|
||||||
pool_stats_t *pool_stats;
|
pool_stats_t *pool_stats;
|
||||||
float pool_fee;
|
float pool_fee;
|
||||||
float payment_threshold;
|
float payment_threshold;
|
||||||
|
uint32_t pool_port;
|
||||||
} wui_context_t;
|
} wui_context_t;
|
||||||
|
|
||||||
int start_web_ui(wui_context_t *context);
|
int start_web_ui(wui_context_t *context);
|
||||||
|
|
Loading…
Reference in a new issue