mirror of
https://github.com/getnamingo/registry.git
synced 2025-06-26 14:14:41 +02:00
Further updates to the logs page
This commit is contained in:
parent
361ccb3a7e
commit
9fafe701aa
3 changed files with 38 additions and 19 deletions
|
@ -44,32 +44,32 @@
|
||||||
<div class="container-xl">
|
<div class="container-xl">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div id="table-default" class="table-responsive">
|
<div id="table-logs" class="table-responsive">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><button class="table-sort" data-sort="sort-id">Date</button></th>
|
<th><button class="table-sort" data-sort="sort-date">Date</button></th>
|
||||||
<th><button class="table-sort" data-sort="sort-name">Registrar</button></th>
|
<th><button class="table-sort" data-sort="sort-registrar">Registrar</button></th>
|
||||||
<th><button class="table-sort" data-sort="sort-name">Command</button></th>
|
<th><button class="table-sort" data-sort="sort-command">Command</button></th>
|
||||||
<th><button class="table-sort" data-sort="sort-crdate">Object</button></th>
|
<th><button class="table-sort" data-sort="sort-object">Object</button></th>
|
||||||
<th><button class="table-sort" data-sort="sort-status">Result</button></th>
|
<th><button class="table-sort" data-sort="sort-result">Result</button></th>
|
||||||
<th><button class="table-sort" data-sort="sort-id">Message</button></th>
|
<th><button class="table-sort" data-sort="sort-message">Message</button></th>
|
||||||
<th><button class="table-sort" data-sort="sort-name">Miliseconds</button></th>
|
<th><button class="table-sort" data-sort="sort-milliseconds">Milliseconds</button></th>
|
||||||
<th><button class="table-sort" data-sort="sort-name">clTRID</button></th>
|
<th><button class="table-sort" data-sort="sort-cltrid">clTRID</button></th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="table-tbody">
|
<tbody class="table-tbody">
|
||||||
{% for log in logs %}
|
{% for log in logs %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ log.cldate }}</td>
|
<td class="sort-date">{{ log.cldate }}</td>
|
||||||
<td>{{ log.registrar_id }}</td>
|
<td class="sort-registrar">{{ log.registrar_id }}</td>
|
||||||
<td>{{ log.cmd }}</td>
|
<td class="sort-command">{{ log.cmd }}</td>
|
||||||
<td>{{ log.obj_id }}</td>
|
<td class="sort-object">{{ log.obj_id }}</td>
|
||||||
<td>{{ log.code }}</td>
|
<td class="sort-result">{{ log.code }}</td>
|
||||||
<td>{{ log.msg }}</td>
|
<td class="sort-message">{{ log.msg }}</td>
|
||||||
<td>{{ log.clmicrosecond }}</td>
|
<td class="sort-milliseconds">{{ log.clmicrosecond }}</td>
|
||||||
<td>{{ log.clTRID }}</td>
|
<td class="sort-cltrid">{{ log.clTRID }}</td>
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
<span class="dropdown">
|
<span class="dropdown">
|
||||||
<button class="btn dropdown-toggle align-text-top" data-bs-boundary="viewport" data-bs-toggle="dropdown">Actions</button>
|
<button class="btn dropdown-toggle align-text-top" data-bs-boundary="viewport" data-bs-toggle="dropdown">Actions</button>
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table><ul class="pagination"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -318,6 +318,8 @@
|
||||||
{% include 'partials/js-contacts.twig' %}
|
{% include 'partials/js-contacts.twig' %}
|
||||||
{% elseif route_is('hosts') %}
|
{% elseif route_is('hosts') %}
|
||||||
{% include 'partials/js-hosts.twig' %}
|
{% include 'partials/js-hosts.twig' %}
|
||||||
|
{% elseif route_is('logs') %}
|
||||||
|
{% include 'partials/js-logs.twig' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include 'partials/js.twig' %}
|
{% include 'partials/js.twig' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
17
cp/resources/views/partials/js-logs.twig
Normal file
17
cp/resources/views/partials/js-logs.twig
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<script src="/assets/libs/list.js/dist/list.min.js" defer></script>
|
||||||
|
<script src="/assets/js/tabler.min.js" defer></script>
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
const list = new List('table-logs', {
|
||||||
|
sortClass: 'table-sort',
|
||||||
|
listClass: 'table-tbody',
|
||||||
|
valueNames: [ 'sort-date', 'sort-registrar', 'sort-command', 'sort-object',
|
||||||
|
'sort-result', 'sort-message', 'sort-milliseconds', 'sort-cltrid'
|
||||||
|
],
|
||||||
|
page: 10,
|
||||||
|
pagination: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue