This commit is contained in:
Takeus committed 2025-02-08 21:22:05 +01:00
1 parent 4870f0b089
commit e5fbf15828
5 files changed
+44 -20

No files matched your search

+25 -12
View File
@@ -6,10 +6,9 @@
<div class="row">
<!-- IPV4 TABLE -->
<div class="col-9">
<table class="table table-striped table-hover">
<table class="table table-striped table-hover table-sm">
<thead>
<tr>
<th scope="col">Network</th>
<th scope="col">IPv4</th>
<th scope="col">Hostname</th>
<th scope="col">Description</th>
@@ -20,10 +19,9 @@
<tbody>
{% for allocation in allocations %}
<tr>
<th scope="row">{{network.network_address}}</th>
<td>{{allocation.ipv4}}</td>
<td><b>{{allocation.ipv4}}</b></td>
<td>{{allocation.hostname}}</td>
<td><b>{{allocation.description}}</b></td>
<td>{{allocation.description}}</td>
<td>
{% if Inventory.query.filter_by(id=allocation.device_id).first() %}
<a href="{{Inventory.query.filter_by(id=allocation.device_id).first().id}}" style="text-decoration:none;">link</a>
@@ -81,14 +79,29 @@
</div>
</div>
</div>
<div class="d-flex justify-content-between">
<nav>
<ul class="pagination">
{% if allocations.has_prev %}
<li class="page-item"><a class="page-link" href="?page={{prev_page}}">Previous</a></li>
{% endif %}
{% if allocations.has_next %}
<li class="page-item"><a class="page-link" href="?page={{next_page}}">Next</a></li>
{% endif %}
<!--
{% for page in range(allocations.pages+1) %}
{% if page != 0%}
<li class="page-item"><a class="page-link {%if page==active_page%}active{%endif%}" href="?page={{page}}">{{page}}</a></li>
{% endif %}
{% endfor %}-->
</ul>
</nav>
<div>
{{ allocations.first }} - {{ allocations.last }} of {{ allocations.total }}
</div>
</div>
</div>
<nav class="d-flex flex-row justify-content-center align-items-center">
<ul class="pagination">
{% for page in allocations.iter_pages() %}
<li class="page-item"><a class="page-link" href="?page={{page}}">{{page}}</a></li>
{% endfor %}
</ul>
</nav>
<!-- MODAL -->
<div id="modal-del"
class="modal modal-blur fade"
+1 -1
View File
@@ -23,7 +23,7 @@
<th scope="row">{{network.id}}</th>
<td>{{network.network_address}}</td>
<td>{{network.prefix}}</td>
<td>{{Allocation.query.filter_by(net_id=network.id).count()}} / {{network.hosts}} </td>
<td>{{Allocation.query.filter_by(net_id=network.id,is_used=True).count()}} / {{network.hosts}} </td>
<td><b>{{network.description}}</b></td>
<td>
<a href="{{ url_for('base.allocations',net_id=network.id) }}" class="btn btn-sm btn-outline-info" style="padding-top:1px;padding-bottom:1px">Allocations</a>