mirror of
https://github.com/eduardogsilva/routerfleet.git
synced 2025-08-04 10:15:00 +02:00
display last backup timestamp and improve router group display.
This commit is contained in:
parent
a1ad01cbc8
commit
d593e47239
2 changed files with 26 additions and 7 deletions
|
@ -143,7 +143,7 @@
|
|||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="/message_center/channel_list/" class="nav-link {% if '/message_center/' in request.path %}active{% endif %}">
|
||||
<i class="far fa-envelope nav-icon"></i>
|
||||
|
@ -297,6 +297,9 @@
|
|||
"info": true,
|
||||
"autoWidth": false,
|
||||
"responsive": true,
|
||||
"columnDefs": [
|
||||
{ "orderable": false, "targets": [ 0, -1 ] }
|
||||
]
|
||||
});
|
||||
});
|
||||
$('.datatables-with-export').show();
|
||||
|
@ -401,4 +404,4 @@
|
|||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -17,13 +17,14 @@
|
|||
<table class="table table-hover datatables-no-export">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Select</th>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Version</th>
|
||||
<th>Address</th>
|
||||
<th>Status</th>
|
||||
<th>Backup</th>
|
||||
<th>Last Backup</th>
|
||||
<th>Groups</th>
|
||||
<th>Auth</th>
|
||||
<th></th>
|
||||
|
@ -61,7 +62,22 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ router.routergroup_set.count }}</td>
|
||||
<td>
|
||||
{% if router.router_type != 'monitoring' and router.routerstatus.last_backup %}
|
||||
{{ router.routerstatus.last_backup|date:"Y-m-d H:i:s" }}
|
||||
{% else %}
|
||||
---
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if router.routergroup_set.exists %}
|
||||
{% for group in router.routergroup_set.all %}
|
||||
{{ group.name }}{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
---
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="min-width">
|
||||
{% if router.router_type != 'monitoring' %}
|
||||
{% if router.ssh_key %}
|
||||
|
@ -143,7 +159,7 @@
|
|||
|
||||
if (currentStatus !== newStatus) {
|
||||
$cell.html(newStatusHtml);
|
||||
|
||||
|
||||
$(document).Toasts('create', {
|
||||
class: router.online ? 'bg-success' : 'bg-danger',
|
||||
title: 'Host status updated',
|
||||
|
@ -156,7 +172,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setInterval(checkStatusChange, 30000);
|
||||
$(document).ready(function() {
|
||||
checkStatusChange();
|
||||
|
@ -253,4 +269,4 @@ $(document).ready(function() {
|
|||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue