diff --git a/static/nodes.html b/static/nodes.html index b519c797..031a901c 100644 --- a/static/nodes.html +++ b/static/nodes.html @@ -1,7 +1,7 @@
<%- include("head.html") %> - + @@ -10,7 +10,49 @@Current connections:
"; + for(let id in slaves){ + let slave = slaves[id]; + html += ` +ID: ${id}
+Last seen: ${moment(Number(slave.time)).format("DD.MM.YY, hh:mm")}
+Online players: ${slave.playerCount}
+IP: ${slave.publicIP}:${slave.serverPort}
+Host: ${slave.mac}
+ ${findInArray("modName", "remoteMap", slave.mods).length ? "Remote map" : ""} + ` + for(let o in masterPlugins){ + let plug = masterPlugins[o]; + if(plug.main + && plug.main.ui + && typeof plug.main.ui.slaveListing == "object" + && Array.isArray(plug.main.ui.slaveListing)){ + let slaveListingEntries = plug.main.ui.slaveListing; + for(let i in slaveListingEntries){ + let button = slaveListingEntries[i]; + if(button.getHtml && typeof button.getHtml == "function"){ + html += button.getHtml({slave}); + } + } + } + } + html += ` +