- Fixes
- ADD list view for allocations
- ADD hide dhcp option (list view)
This commit is contained in:
Lucas committed 2026-01-22 16:39:38 +01:00
1 parent 03e543e7f8
commit 800ff061b7
8 files changed
+100 -33

No files matched your search

+1 -1
View File
@@ -1 +1 @@
<footer class="test-center" style="text-align: center;">Flask IPAM - 2025 - {{app_version}}</footer>
<footer class="test-center" style="text-align: center;">Flask IPAM - {{app_version}}</footer>
+9 -6
View File
@@ -1,6 +1,8 @@
{% for allocation in allocations %}
{% if session['hide_dhcp'] and allocation.is_dhcp %}
{% else %}
<tr>
<td><b>{{allocation.ipv4}}</b></td>
<td id="{{allocation.ipv4}}"><b>{{allocation.ipv4}}</b></td>
<td>{{allocation.hostname}}</td>
<td>{{allocation.description}}</td>
<td>
@@ -26,7 +28,7 @@
<td>
{% if allocation.is_used %}
<button
hx-get="{{ url_for('network.allocation_edit_modal',net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}"
hx-get="{{ url_for('network.allocation_edit_modal',net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}&item={{allocation.ipv4}}"
hx-trigger="click"
hx-target="#modal-edit"
data-bs-toggle="modal"
@@ -36,12 +38,12 @@
> Edit
</button>
{% if allocation.is_decom %}
<a href="{{ url_for('network.allocation_decom',action=2,net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}" class="btn btn-sm btn-outline-primary" style="padding-top:1px;padding-bottom:1px">Undecom</a>
<a href="{{ url_for('network.allocation_decom',action=2,net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}&item={{allocation.ipv4}}" class="btn btn-sm btn-outline-primary" style="padding-top:1px;padding-bottom:1px">Undecom</a>
{% else %}
<a href="{{ url_for('network.allocation_decom',action=1,net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}" class="btn btn-sm btn-outline-warning" style="padding-top:1px;padding-bottom:1px">Decom</a>
<a href="{{ url_for('network.allocation_decom',action=1,net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}&item={{allocation.ipv4}}" class="btn btn-sm btn-outline-warning" style="padding-top:1px;padding-bottom:1px">Decom</a>
{% endif %}
<button
hx-get="{{ url_for('network.allocation_del_modal',net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}"
hx-get="{{ url_for('network.allocation_del_modal',net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}&item={{allocation.ipv4}}"
hx-trigger="click"
hx-target="#modal-del"
data-bs-toggle="modal"
@@ -52,7 +54,7 @@
</button>
{% else %}
<button
hx-get="{{ url_for('network.allocation_edit_modal',net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}"
hx-get="{{ url_for('network.allocation_edit_modal',net_id=network.id,ipv4=allocation.ipv4) }}?page={{active_page}}&item={{allocation.ipv4}}"
hx-trigger="click"
hx-target="#modal-edit"
data-bs-toggle="modal"
@@ -65,4 +67,5 @@
</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
+4 -1
View File
@@ -6,7 +6,7 @@
<div class="row">
<!-- Search BAR -->
<div class="col-12">
<div class="mb-3">
<div class="input-group mb-3">
<input class="form-control" type="search"
name="search" placeholder="Begin Typing To Search Allocation(s)..."
hx-post="{{ url_for('network.allocation_search',net_id=network.id) }}"
@@ -14,6 +14,8 @@
hx-target="#search-results"
hx-indicator=".htmx-indicator"
>
<a class="btn btn-outline-secondary" href="?view=change">change view</a>
<a class="btn btn-outline-secondary" href="?view=hide_dhcp">Hide DHCP</a>
</div>
</div>
<!-- IPV4 TABLE -->
@@ -82,4 +84,5 @@
<div class="modal-content"></div>
</div>
</div>
<script src="{{ url_for('static',filename='js/custom.js') }}"></script>
{% endblock %}