Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Added contact and maintainer to stats
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrevinnoc committed Mar 12, 2021
1 parent a26c605 commit e596dc9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions future.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,9 @@ def _getPeerInfo():
"ip": hostIP,
"name": hostname,
"cpu": psutil.cpu_percent(),
"mem": psutil.virtual_memory().percent
"mem": psutil.virtual_memory().percent,
"maintainer": MAINTAINER,
"contact": CONTACT
})


Expand All @@ -661,7 +663,9 @@ def _getPeerInfoList():
"ip": hostIP,
"name": hostname,
"cpu": psutil.cpu_percent(),
"mem": psutil.virtual_memory().percent
"mem": psutil.virtual_memory().percent,
"maintainer": MAINTAINER,
"contact": CONTACT
})
else:
try:
Expand Down
4 changes: 3 additions & 1 deletion templates/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ <h1 id="title"><a href="/">FUTURE</a></h1>
<td>Server name</td>
<td>Uptime</td>
<td>IP</td>
<td>Maintainer</td>
<td>Contact</td>
<td>CPU Load (%)</td>
<td>RAM Load (%)</td>
</tr>
Expand All @@ -120,7 +122,7 @@ <h1 id="title"><a href="/">FUTURE</a></h1>
$("#notice").text(peer_list.length + " nodes connected")
peer_list.forEach(function(peer) {

$("#stats").append('<tr class="peer"><td><a href="http://' + peer["name"] + '">' + peer["name"] + '</a></td><td>' + peer["uptime"] + '</td><td><a href="http://' + peer["ip"] + '">' + peer["ip"] + '</a></td><td>' + peer["cpu"] + '</td><td>' + peer["mem"] + '</td></tr>')
$("#stats").append('<tr class="peer"><td><a href="http://' + peer["name"] + '">' + peer["name"] + '</a></td><td>' + peer["uptime"] + '</td><td><a href="http://' + peer["ip"] + '">' + peer["ip"] + '</a></td><td>' + peer["maintainer"] + '</td><td>' + peer["contact"] + '</td><td>' + peer["cpu"] + '</td><td>' + peer["mem"] + '</td></tr>')

});

Expand Down

0 comments on commit e596dc9

Please sign in to comment.