overte/domain-server/resources/web/index.shtml
2015-08-19 18:23:11 -07:00

80 lines
2.7 KiB
Text

<!--#include file="header.html"-->
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Nodes</h3>
</div>
<div class="panel-body">
<table id="nodes-table" class="table table-striped">
<thead>
<tr>
<th>Type</th>
<th>Version</th>
<th>UUID</th>
<th>Pool</th>
<th>Username</th>
<th>Public</th>
<th>Local</th>
<th>Uptime (s)</th>
<th>Pending Credits</th>
<th>Kill?</th>
</tr>
</thead>
<tbody>
<script id="nodes-template" type="text/template">
<% _.each(nodes, function(node, node_index){ %>
<tr>
<td><%- node.type %></td>
<td><%- node.version %></td>
<td><a href="stats/?uuid=<%- node.uuid %>"><%- node.uuid %></a></td>
<td><%- node.pool %></td>
<td><%- node.username %></td>
<td><%- node.public.ip %><span class='port'>:<%- node.public.port %></span></td>
<td><%- node.local.ip %><span class='port'>:<%- node.local.port %></span></td>
<td><%- node.uptime %></td>
<td><%- (typeof node.pending_credits == 'number' ? node.pending_credits.toLocaleString() : 'N/A') %></td>
<td><span class='glyphicon glyphicon-remove' data-uuid="<%- node.uuid %>"></span></td>
</tr>
<% }); %>
</script>
</table>
</div>
<div class="panel-footer">
<button type="button" class="btn btn-danger" id="kill-all-btn">
<span class="glyphicon glyphicon-remove-circle"></span> Kill all Nodes
</button>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Queued Assignments</h3>
</div>
<div class="panel-body">
<table id="assignments-table" class="table table-striped">
<thead>
<tr>
<th>Type</th>
<th>UUID</th>
<th>Pool</th>
</tr>
</thead>
<tbody>
<script id="queued-template" type="text/template">
<% _.each(queued, function(assignment, uuid){ %>
<tr>
<td><%- assignment.type %></td>
<td><%- uuid %></td>
<td><%- assignment.pool %></td>
</tr>
<% }); %>
</script>
</tbody>
</table>
<div>
</div>
</div>
<!--#include file="footer.html"-->
<script src='js/underscore-min.js'></script>
<script src='js/tables.js'></script>
<!--#include file="page-end.html"-->