Skip to content

Commit

Permalink
Cleanup for #9505
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Aug 16, 2022
1 parent dedee0f commit 6d328a8
Showing 1 changed file with 40 additions and 55 deletions.
95 changes: 40 additions & 55 deletions netbox/templates/ipam/prefix.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,14 @@ <h5 class="card-header">Addressing</h5>
</td>
</tr>
</table>
{% if object.prefix.version == 4 %}
<div class="float-end">
<a class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#prefix-modal">
<i class="mdi mdi-information-outline" aria-hidden="true"></i> Addressing Details
</a>
</div>
{% endif %}
</div>
{% if object.prefix.version == 4 %}
<div class="card-footer text-end noprint">
<a class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#prefix-modal">
<i class="mdi mdi-details" aria-hidden="true"></i>
Details
</a>
</div>
{% endif %}
</div>
{% include 'inc/panels/custom_fields.html' %}
{% include 'inc/panels/tags.html' %}
Expand All @@ -168,54 +167,40 @@ <h5 class="card-header">Addressing</h5>
{% plugin_full_width_page object %}
</div>
</div>
{% if object.prefix.version == 4 %}
<div class="modal fade" id="prefix-modal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Prefix Details</h5>
</div>
<div class="modal-body">
<table class="table table-hover attr-table">
<tr>
<td>
Network Mask
</td>
<td>
{{ object.prefix.netmask }}
</td>
</tr>
<tr>
<td>
Wildcard Mask
</td>
<td>
{{ object.prefix.hostmask }}
</td>
</tr>
<tr>
<td>
Network Address
</td>
<td>
{{ object.prefix.network }}
</td>
</tr>
<tr>
<td>
Broadcast Address
</td>
<td>
{{ object.prefix.broadcast }}
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Close</button>
{% endblock %}

{% block modals %}
{{ block.super }}
{% if object.prefix.version == 4 %}
<div class="modal fade" id="prefix-modal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Prefix Details</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<table class="table table-hover attr-table">
<tr>
<td>Network Address</td>
<td>{{ object.prefix.network }}</td>
</tr>
<tr>
<td>Network Mask</td>
<td>{{ object.prefix.netmask }}</td>
</tr>
<tr>
<td>Wildcard Mask</td>
<td>{{ object.prefix.hostmask }}</td>
</tr>
<tr>
<td>Broadcast Address</td>
<td>{{ object.prefix.broadcast }}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endblock %}

0 comments on commit 6d328a8

Please sign in to comment.