Skip to content

Commit

Permalink
templates: index.js: metrics url for fqdn
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Perchanov <[email protected]>
  • Loading branch information
demisrael committed Sep 24, 2024
1 parent ae126b0 commit b36a50b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const KASPA_NG_URL = 'https://kaspa-ng.org/';

document.addEventListener('DOMContentLoaded', () => {
window.resolver = {
sort : "network",
Expand Down Expand Up @@ -162,6 +164,7 @@ function render() {
let peers_ = pad(peers.toLocaleString(),4);
let clients_ = pad(clients.toLocaleString(),6);
let capacity_ = pad(capacity.toLocaleString(),6);
fqdn = (status != "offline") ? `<a href=${KASPA_NG_URL}?wrpc=${url} target="_blank">${fqdn}</a>` : fqdn;
el.innerHTML = `<td>${sid}:${uid}</td><td>${service}</td><td>${version}</td><td class='fqdn'>${fqdn}</td><td>${protocol}</td><td>${encoding}</td><td>${network}</td><td>${status}</td>`;
if (status != "offline") {
el.innerHTML += `<td class='wide right pre'>${peers_}</td><td class='wide right pre'>${clients_} / ${capacity_}</td><td class='wide right'>${load}%</td>`;
Expand Down

0 comments on commit b36a50b

Please sign in to comment.