mirror of
https://github.com/eduardogsilva/routerfleet.git
synced 2025-08-16 07:47:51 +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>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/message_center/channel_list/" class="nav-link {% if '/message_center/' in request.path %}active{% endif %}">
|
<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>
|
<i class="far fa-envelope nav-icon"></i>
|
||||||
|
@ -297,6 +297,9 @@
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": false,
|
"autoWidth": false,
|
||||||
"responsive": true,
|
"responsive": true,
|
||||||
|
"columnDefs": [
|
||||||
|
{ "orderable": false, "targets": [ 0, -1 ] }
|
||||||
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$('.datatables-with-export').show();
|
$('.datatables-with-export').show();
|
||||||
|
@ -401,4 +404,4 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -17,13 +17,14 @@
|
||||||
<table class="table table-hover datatables-no-export">
|
<table class="table table-hover datatables-no-export">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Select</th>
|
<th></th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Version</th>
|
<th>Version</th>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Backup</th>
|
<th>Backup</th>
|
||||||
|
<th>Last Backup</th>
|
||||||
<th>Groups</th>
|
<th>Groups</th>
|
||||||
<th>Auth</th>
|
<th>Auth</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
@ -61,7 +62,22 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</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">
|
<td class="min-width">
|
||||||
{% if router.router_type != 'monitoring' %}
|
{% if router.router_type != 'monitoring' %}
|
||||||
{% if router.ssh_key %}
|
{% if router.ssh_key %}
|
||||||
|
@ -143,7 +159,7 @@
|
||||||
|
|
||||||
if (currentStatus !== newStatus) {
|
if (currentStatus !== newStatus) {
|
||||||
$cell.html(newStatusHtml);
|
$cell.html(newStatusHtml);
|
||||||
|
|
||||||
$(document).Toasts('create', {
|
$(document).Toasts('create', {
|
||||||
class: router.online ? 'bg-success' : 'bg-danger',
|
class: router.online ? 'bg-success' : 'bg-danger',
|
||||||
title: 'Host status updated',
|
title: 'Host status updated',
|
||||||
|
@ -156,7 +172,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(checkStatusChange, 30000);
|
setInterval(checkStatusChange, 30000);
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
checkStatusChange();
|
checkStatusChange();
|
||||||
|
@ -253,4 +269,4 @@ $(document).ready(function() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue