diff --git a/static/nodeDetails.css b/static/nodeDetails.css index 1983b1db..47d7b191 100644 --- a/static/nodeDetails.css +++ b/static/nodeDetails.css @@ -16,6 +16,9 @@ background-color: #444; height:400px; } +#hero .subtitle { + margin-left:8px; +} #header h1 { margin-left: 10px; @@ -40,7 +43,8 @@ ul { width:300px; list-style:none; - max-height:100px; + max-height:400px; + min-height:100px; margin:0; overflow:auto; padding:0; diff --git a/static/nodeDetails.js b/static/nodeDetails.js index 42662c76..eaa22e8d 100644 --- a/static/nodeDetails.js +++ b/static/nodeDetails.js @@ -56,7 +56,7 @@ populateSlaveInfo(); function populateSlaveInfo(){ let instanceID = getParameterByName("instanceID"); if(!instanceID){ - throw "We need instanceID! GIVE US SLAVEID! ALL HAIL OUR NEW OVERLORDS!" + throw "We need instanceID! Also, *funny joke* but it doesn't work after I standardized on calling it instanceID"; } getJSON("/api/slaves", function(err, slaveData){ /* @@ -89,17 +89,30 @@ function populateSlaveInfo(){ if(slave.publicIP != "localhost"){ HTML += "
Last seen: "+moment(Number(slave.time)).fromNow()+"
" - HTML += "Online players: "+slave.playerCount+"
" + HTML += "Last seen: "+moment(Number(slave.time)).fromNow()+"
"; + HTML += "Online players: "+slave.playerCount+"
"; + + // detect if remoteMap mod is installed, if it is we want to show the link for it + let hasRemoteMap = false; + slave.mods.forEach(mod => { + console.log(mod.modName) + if(mod.modName.includes("remoteMap")){ + hasRemoteMap = true; // we are still doing the logic on the outside, in case there are multiple instances of remoteMap installed.... + } + }); + if(hasRemoteMap){ + HTML += "Remote map"; + } + HTML += "ID: " + slaveData[key].unique + "
Last seen: "+seenDate+"
Online players: "+slaveData[key].playerCount+"
IP: "+slaveData[key].publicIP +":"+ slaveData[key].serverPort+"
" HTML += "Host: "+slaveData[key].mac+"
"; - HTML += ""; - HTML += ""; + + // detect if remoteMap mod is installed, if it is we want to show the link for it + let hasRemoteMap = false; + slaveData[key].mods.forEach(mod => { + console.log(mod.modName); + if(mod.modName.includes("remoteMap")){ + hasRemoteMap = true; // we are still doing the logic on the outside, in case there are multiple instances of remoteMap installed.... + } + }); + if(hasRemoteMap){ + HTML += "Remote map" + } + + HTML += "Graph tools:
"; + HTML += ""; + HTML += ""; HTML += "