Files
DRB-CnC/Server/views/index.ejs
2023-08-04 23:21:35 -04:00

64 lines
2.2 KiB
Plaintext

<%- include('partials/htmlHead.ejs', {'page': page}) %>
<div class="container">
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-4 mt-2">
<%- include('partials/valueChip.ejs', {
'title': 'Nodes in the Network',
'bgColor': "orange-dark",
'value': nodes.length,
'progressPercent': false,
'icon': 'server'
}) %>
<%- include('partials/valueChip.ejs', {
'title': 'Nodes Online',
'bgColor': "green",
'value': nodes.filter(node => node.online).length,
'progressPercent': false,
'icon': 'cpu-fill'
}) %>
<%- include('partials/valueChip.ejs', {
'title': 'Nodes with Discord Connections',
'bgColor': "blue-dark",
'value': connections.length,
'progressPercent': false,
'icon': 'gear-wide-connected'
}) %>
</div>
<div class="my-4">
<p><h3><b>Current Connections</b></h3></p>
</div>
<hr>
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-4">
<% for(const conn of connections) { %>
<%- include('partials/connectionCard.ejs', {'connection': conn}) %>
<%}%>
</div>
<div class="my-4">
<p><h3><b>Online Nodes</b></h3></p>
</div>
<hr>
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-4">
<% for(const node of nodes.filter(node => node.online)) { %>
<%- include('partials/nodeCard.ejs', {'node': node}) %>
<%}%>
</div>
<div class="my-4">
<p><h3><b>Offline Nodes</b></h3></p>
</div>
<hr>
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-4">
<% for(const node of nodes.filter(node => node.online == false)) { %>
<%- include('partials/nodeCard.ejs', {'node': node}) %>
<%}%>
</div>
</div>
<%- include('partials/bodyEnd.ejs') %>
<%- include('partials/htmlFooter.ejs') %>