accessGate/views/admin/group_edit.ejs

157 lines
9.9 KiB
Plaintext

<%- include('../navbar', {active: "admin-groups"}); %>
<div class="container-fluid">
<h3 class="text-dark mb-4"><a style="text-decoration: none" href="/admin/groups">Groups</a> / <%= group.name %></h3>
<div class="card shadow mb-5">
<div class="card-header py-3">
<p class="text-primary m-0 fw-bold">User access</p>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-6 text-nowrap">
<div id="dataTable_length" class="dataTables_length" aria-controls="dataTable"><label class="form-label">Show&nbsp;<select class="d-inline-block form-select form-select-sm">
<option value="all" selected="">all</option>
</select>&nbsp;</label></div>
</div>
</div>
<div class="table-responsive table mt-2" id="dataTable1" role="grid" aria-describedby="dataTable_info">
<table class="table my-0" id="tableEnabled1">
<thead>
<tr>
<th>Username</th>
<th>id</th>
<th></th>
</tr>
</thead>
<tbody>
<% outGroup.forEach(function (member) { %>
<tr>
<td><img class="rounded-circle me-2" width="30" height="30" src="<%= member.avatar %>"><%= member.login %></td>
<td><%= member.id %></td>
<td style="text-align: right;"><a class="btn btn-sm btn-success" href="/admin/members/<%= group.name %>/add/<%= member.id %>"><i class="text-white fa fa-plus"></i></button></td>
</tr>
<% }) %>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
</div>
<div class="col-md-6" >
<div class="row" >
<div class="text-md-end dataTables_filter" id="dataTable_filter"><label class="form-label">
<input type="search" class="form-control form-control-sm" id="tableInput1" onkeyup="tableSearch(1)" aria-controls="dataTable" placeholder="Search"></label>
</div>
</div>
<div class="table-responsive table mt-2" role="grid" >
<table class="table my-0">
<thead>
<tr>
<th>username</th>
<th>id</th>
<th></th>
</tr>
</thead>
<tbody>
<% inGroup.forEach(function (member) { %>
<tr>
<td><img class="rounded-circle me-2" width="30" height="30" src="<%= member.avatar %>"><%= member.login %></td>
<td><%= member.id %></td>
<td style="text-align: right;"><a class="btn btn-sm btn-danger" href="/admin/members/<%= group.name %>/delete/<%= member.id %>"><i class="far fa-trash-alt"></i></a></td>
</tr>
<% }) %>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="card shadow mb-5">
<div class="card-header py-3">
<p class="text-primary m-0 fw-bold">Server linked</p>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-6 text-nowrap">
<div id="dataTable_length" class="dataTables_length" aria-controls="dataTable"><label class="form-label">Show&nbsp;<select class="d-inline-block form-select form-select-sm">
<option value="all" selected="">all</option>
</select>&nbsp;</label></div>
</div>
</div>
<div class="table-responsive table mt-2" id="dataTable" role="grid" aria-describedby="dataTable_info">
<table class="table my-0" id="tableEnabled2">
<thead>
<tr>
<th>hostname</th>
<th>ip</th>
<th>user</th>
<th></th>
</tr>
</thead>
<tbody>
<% outServer.forEach(function (access) { %>
<tr>
<td><%= access.hostname %></td>
<td><%= access.ip %></td>
<td><%= access.user %></td>
<td style="text-align: right;"><a class="btn btn-sm btn-success" href="/admin/accesses/<%= group.name %>/add/<%= access.hostname %>"><i class="fas fa-plus text-white"></i></a></td>
</tr>
<% }) %>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="text-md-end dataTables_filter" id="dataTable_filter"><label class="form-label">
<input type="search" class="form-control form-control-sm" id="tableInput2" onkeyup="tableSearch(2)" aria-controls="dataTable" placeholder="Search"></label>
</div>
<div class="table-responsive table mt-2" id="dataTable2" role="grid" aria-describedby="dataTable_info">
<table class="table my-0" id="tableEnabled">
<thead>
<tr>
<th>hostname</th>
<th>ip</th>
<th>user</th>
<th></th>
</tr>
</thead>
<tbody>
<% inServer.forEach(function (access) { %>
<tr>
<td><%= access.hostname %></td>
<td><%= access.ip %></td>
<td><%= access.user %></td>
<td style="text-align: right;"><a class="btn btn-sm btn-danger" href="/admin/accesses/<%= group.name %>/delete/<%= access.hostname %>"><i class="far fa-trash-alt"></i></a></td>
</tr>
<% }) %>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<%- include('../footer'); %>