Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Commit 4cdfe0f

Browse files
author
Wyatt Mufson
committed
Update monitor site with seconds since last block
1 parent 90ea7b1 commit 4cdfe0f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
<td id="txPerSecond">Transactions Per Second: 0</td>
2121
<td id="blockTime">Average Block Time: 0</td>
2222
</tr>
23+
<tr>
24+
<td id="sinceLastBlock">Seconds since last block: 0</td>
25+
</tr>
2326
</tbody>
2427
</table>
2528
</body>

js/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function parseStats(statObj) {
2222
totalTransactions,
2323
txPerSecond,
2424
blockTime,
25+
sinceLastBlock,
2526
} = statObj;
2627

2728
const elapsedText = secondsToHms(elapsedTime);
@@ -31,6 +32,7 @@ function parseStats(statObj) {
3132
document.getElementById('totalTx').innerHTML = `Total Transactions: ${totalTransactions}`;
3233
document.getElementById('txPerSecond').innerHTML = `Transactions Per Second: ${txPerSecond}`;
3334
document.getElementById('blockTime').innerHTML = `Block Time: ${blockTime}`;
35+
document.getElementById('sinceLastBlock').innerHTML = `Seconds since last block: ${sinceLastBlock}`;
3436
}
3537

3638
socket.on('StatUpdate', (data) => {

0 commit comments

Comments
 (0)