{% extends 'layouts/report.html.twig' %}
{% block title %}SSP Endpoints{% endblock %}
{% block report_content %}
<div class="row mb-4 js-actions-bar">
<div class="col-12 text-right">
<a class="btn btn-primary" href="{{ path('ssp_new') }}" title="New SSP Endpoint">+ New</a>
</div>
</div>
<div class="row">
<div class="col-12">
<table class="table table-striped" id="reportTable">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Abbreviation</th>
<th scope="col">Name</th>
<th scope="col">Protocol</th>
<th scope="col">Enabled</th>
<th scope="col">Created On</th>
<th scope="col">Updated On</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
{% if endpoints is empty %}
<tr>
<th colspan="8">There are no endpoints.</th>
</tr>
{% endif %}
{% for endpoint in endpoints %}
<tr>
<td class="align-middle">{{ endpoint.id }}</td>
<td class="align-middle text-truncate">{{ endpoint.abbr }}</td>
<td class="align-middle text-truncate">{{ endpoint.name }}</td>
<td class="align-middle text-truncate">{{ endpoint.protocol }}</td>
<td class="align-middle">{{ endpoint.enabled is not empty ? 'Yes' : 'No' }}</td>
<td class="align-middle">{{ endpoint.created|date("Y-m-d H:i:s T") }}</td>
<td class="align-middle">{{ endpoint.updated|date("Y-m-d H:i:s T") }}</td>
<td class="align-middle"><a class="btn btn-primary" href="{{ path('ssp_edit', {id: endpoint.id}) }}" title="Edit SSP Endpoint">Edit</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<script>
$(document).ready(function () {
//Initialize DataTables, with no sorting on the 'details' column
$('#reportTable').DataTable({
paging: true,
aaSorting: [],
columns: [
{"name": "id", searchable: true},
{"name": "abbr", searchable: true},
{"name": "name", searchable: true},
{"name": "protocol", searchable: true},
{"name": "enabled", searchable: true},
{"name": "createdOn", searchable: true},
{"name": "updatedOn", searchable: true}
]
});
});
</script>
{% endblock %}