From 4d944d3dc36ecae5492f6700323555e502546cda Mon Sep 17 00:00:00 2001 From: SChernykh Date: Sun, 8 Oct 2023 18:11:07 +0200 Subject: [PATCH] HTML: added latest release URL --- docs/html/index.html | 5 +++++ docs/html/mini/index.html | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/html/index.html b/docs/html/index.html index a6ffbf5..6f101ab 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -80,9 +80,12 @@ async function load_data() { let pool_stats_req = await fetch('api/pool/stats'); let pool_blocks_req = await fetch('api/pool/blocks'); let network_stats_req = await fetch('api/network/stats'); + let latest_release_req = await fetch('api/latest_release'); + let pool_stats = JSON.parse(await pool_stats_req.text()); let pool_blocks = JSON.parse(await pool_blocks_req.text()); let network_stats = JSON.parse(await network_stats_req.text()); + let latest_release = JSON.parse(await latest_release_req.text()); let pool_hashrate = pool_stats.pool_statistics.hashRate / 1e6; let pplns_duration = pool_stats.pool_statistics.pplnsWeight / pool_stats.pool_statistics.hashRate; @@ -92,6 +95,7 @@ async function load_data() { document.getElementById("pplns_duration").innerHTML = elapsedTimeStr(0, pplns_duration, 0) + ' ' + Math.floor(pplns_duration % 60) + 's'; document.getElementById("pool_miners").innerHTML = pool_stats.pool_statistics.miners; document.getElementById("min_payout").innerHTML = min_payout.toFixed(5) + ' XMR'; + document.getElementById("latest_release").innerHTML = '' + latest_release.name + ''; let ts = Math.floor(Date.now() / 1000); @@ -190,6 +194,7 @@ function toggle_menu(name) {
P2Pool
Decentralized Monero mining pool
+
Latest release: P2Pool

diff --git a/docs/html/mini/index.html b/docs/html/mini/index.html index 11c2c45..9bdcfbe 100644 --- a/docs/html/mini/index.html +++ b/docs/html/mini/index.html @@ -80,9 +80,12 @@ async function load_data() { let pool_stats_req = await fetch('api/pool/stats'); let pool_blocks_req = await fetch('api/pool/blocks'); let network_stats_req = await fetch('api/network/stats'); + let latest_release_req = await fetch('api/latest_release'); + let pool_stats = JSON.parse(await pool_stats_req.text()); let pool_blocks = JSON.parse(await pool_blocks_req.text()); let network_stats = JSON.parse(await network_stats_req.text()); + let latest_release = JSON.parse(await latest_release_req.text()); let pool_hashrate = pool_stats.pool_statistics.hashRate / 1e6; let pplns_duration = pool_stats.pool_statistics.pplnsWeight / pool_stats.pool_statistics.hashRate; @@ -92,6 +95,7 @@ async function load_data() { document.getElementById("pplns_duration").innerHTML = elapsedTimeStr(0, pplns_duration, 0) + ' ' + Math.floor(pplns_duration % 60) + 's'; document.getElementById("pool_miners").innerHTML = pool_stats.pool_statistics.miners; document.getElementById("min_payout").innerHTML = min_payout.toFixed(5) + ' XMR'; + document.getElementById("latest_release").innerHTML = '' + latest_release.name + ''; let ts = Math.floor(Date.now() / 1000); @@ -190,6 +194,7 @@ function toggle_menu(name) {
P2Pool mini
Decentralized Monero mining pool
+
Latest release: P2Pool

@@ -308,4 +313,4 @@ Donate to support the project: