mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Remove remoteMap specific code left behind after the removal of the
remoteMap plugin in 6415784. The plugin interface should be versatile
enough to allow all of this code to reside inside the plugin itself.
63 lines
2.2 KiB
HTML
63 lines
2.2 KiB
HTML
<!doctype HTML>
|
|
<head>
|
|
<%- include("head.html") %>
|
|
<!-- <script src="slaveDisplay.js"></script> -->
|
|
</head>
|
|
|
|
<body>
|
|
<%- include("nav.html") %>
|
|
<div id="body" class="container">
|
|
<div class="page-header mt-2 row" id="banner">
|
|
<div class="col-lg-8 col-md-7 col-sm-6">
|
|
<h2>Connected Nodes</h2>
|
|
</div>
|
|
</div>
|
|
<div id="display">
|
|
<%
|
|
let html = ""
|
|
for(let id in slaves){
|
|
let slave = slaves[id];
|
|
html += `
|
|
<div id="${id}" class="slaveBox card mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title"><a href='nodeDetails?instanceID=${id}'>
|
|
${slave.instanceName}
|
|
</a></h5>
|
|
</div>
|
|
<ul class="list-group list-group-flush">
|
|
<li class="list-group-item">ID: ${id}</li>
|
|
<li class="list-group-item">Last seen: ${moment(Number(slave.time)).format("DD.MM.YY, hh:mm")}</li>
|
|
<li class="list-group-item">Online players: ${slave.playerCount}</li>
|
|
<li class="list-group-item">IP: ${slave.publicIP}:${slave.serverPort}</li>
|
|
<li class="list-group-item">Host: ${slave.mac}</li>
|
|
</ul>
|
|
`
|
|
for(let o in locals.masterPlugins){
|
|
let plug = locals.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 += "<div class=\"plugin-link\">"
|
|
html += button.getHtml({slave});
|
|
html += "</div>"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
html += `
|
|
</div>
|
|
`
|
|
}
|
|
%>
|
|
<%- html %>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$('.plugin-link a').addClass('btn btn-primary')
|
|
</script>
|
|
</body> |