2021-03-29 16:43:29 -04:00
|
|
|
{% extends 'ipam/prefix/base.html' %}
|
2022-01-03 09:17:15 -05:00
|
|
|
{% load humanize %}
|
2017-11-22 12:40:58 -05:00
|
|
|
{% load helpers %}
|
2020-03-15 23:45:18 -04:00
|
|
|
{% load plugins %}
|
2016-03-01 11:23:03 -05:00
|
|
|
|
2021-03-13 14:26:12 -07:00
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
2021-12-29 09:59:25 -05:00
|
|
|
<div class="col col-md-6">
|
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">Prefix</h5>
|
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-hover attr-table">
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Family</th>
|
|
|
|
<td>IPv{{ object.family }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">VRF</th>
|
|
|
|
<td>
|
|
|
|
{% if object.vrf %}
|
2022-01-28 13:19:23 -05:00
|
|
|
<a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a>
|
2021-12-29 09:59:25 -05:00
|
|
|
{% else %}
|
|
|
|
<span>Global</span>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Tenant</th>
|
2022-03-22 15:29:05 -04:00
|
|
|
<td>
|
2021-12-29 09:59:25 -05:00
|
|
|
{% if object.tenant.group %}
|
2022-03-22 14:51:20 -04:00
|
|
|
{{ object.tenant.group|linkify }} /
|
2021-12-29 09:59:25 -05:00
|
|
|
{% endif %}
|
2022-03-22 15:29:05 -04:00
|
|
|
{{ object.tenant|linkify|placeholder }}
|
|
|
|
</td>
|
2021-12-29 09:59:25 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Aggregate</th>
|
|
|
|
<td>
|
|
|
|
{% if aggregate %}
|
|
|
|
<a href="{% url 'ipam:aggregate' pk=aggregate.pk %}">{{ aggregate.prefix }}</a> ({{ aggregate.rir }})
|
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-12-29 09:59:25 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Site</th>
|
|
|
|
<td>
|
|
|
|
{% if object.site %}
|
|
|
|
{% if object.site.region %}
|
2022-03-22 14:51:20 -04:00
|
|
|
{{ object.site.region|linkify }} /
|
2021-12-29 09:59:25 -05:00
|
|
|
{% endif %}
|
2022-03-22 14:51:20 -04:00
|
|
|
{{ object.site|linkify }}
|
2021-12-29 09:59:25 -05:00
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-12-29 09:59:25 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">VLAN</th>
|
|
|
|
<td>
|
|
|
|
{% if object.vlan %}
|
|
|
|
{% if object.vlan.group %}
|
2022-03-22 14:51:20 -04:00
|
|
|
{{ object.vlan.group|linkify }} /
|
2021-12-29 09:59:25 -05:00
|
|
|
{% endif %}
|
2022-03-22 14:51:20 -04:00
|
|
|
{{ object.vlan|linkify }}
|
2021-12-29 09:59:25 -05:00
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-12-29 09:59:25 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Status</th>
|
2022-02-11 14:25:13 -05:00
|
|
|
<td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
|
2021-12-29 09:59:25 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Role</th>
|
2022-03-22 14:51:20 -04:00
|
|
|
<td>{{ object.role|linkify|placeholder }}</td>
|
2021-12-29 09:59:25 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Description</th>
|
|
|
|
<td>{{ object.description|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Is a pool</th>
|
2021-12-29 10:26:42 -05:00
|
|
|
<td>{% checkmark object.is_pool %}</td>
|
2021-12-29 09:59:25 -05:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2020-03-15 23:45:18 -04:00
|
|
|
</div>
|
2021-12-29 09:59:25 -05:00
|
|
|
{% plugin_left_page object %}
|
|
|
|
</div>
|
|
|
|
<div class="col col-md-6">
|
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">Addressing</h5>
|
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-hover attr-table">
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Utilization</th>
|
|
|
|
<td>
|
|
|
|
{% if object.mark_utilized %}
|
|
|
|
{% utilization_graph 100 warning_threshold=0 danger_threshold=0 %}
|
|
|
|
<small>(Marked fully utilized)</small>
|
|
|
|
{% else %}
|
|
|
|
{% utilization_graph object.get_utilization %}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% with child_ip_count=object.get_child_ips.count %}
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Child IPs</th>
|
|
|
|
<td>
|
|
|
|
<a href="{% url 'ipam:prefix_ipaddresses' pk=object.pk %}">{{ child_ip_count }}</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2022-01-03 09:17:15 -05:00
|
|
|
{% endwith %}
|
|
|
|
{% with available_count=object.get_available_ips.size %}
|
2021-12-29 09:59:25 -05:00
|
|
|
<tr>
|
|
|
|
<th scope="row">Available IPs</th>
|
2022-01-03 09:17:15 -05:00
|
|
|
<td>
|
|
|
|
{# Use human-friendly words for counts greater than one million #}
|
|
|
|
{% if available_count > 1000000 %}
|
|
|
|
{{ available_count|intword }}
|
|
|
|
{% else %}
|
|
|
|
{{ available_count|intcomma }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2021-12-29 09:59:25 -05:00
|
|
|
</tr>
|
|
|
|
{% endwith %}
|
|
|
|
<tr>
|
|
|
|
<td>First available IP</td>
|
|
|
|
<td>
|
|
|
|
{% with first_available_ip=object.get_first_available_ip %}
|
|
|
|
{% if first_available_ip %}
|
|
|
|
{% if perms.ipam.add_ipaddress %}
|
|
|
|
<a href="{% url 'ipam:ipaddress_add' %}?address={{ first_available_ip }}">{{ first_available_ip }}</a>
|
|
|
|
{% else %}
|
|
|
|
{{ first_available_ip }}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-12-29 09:59:25 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2022-08-16 10:04:47 -04:00
|
|
|
{% 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 %}
|
2021-12-29 09:59:25 -05:00
|
|
|
</div>
|
2021-03-13 02:19:42 -07:00
|
|
|
</div>
|
2021-12-29 09:59:25 -05:00
|
|
|
{% include 'inc/panels/custom_fields.html' %}
|
|
|
|
{% include 'inc/panels/tags.html' %}
|
|
|
|
{% plugin_right_page object %}
|
|
|
|
</div>
|
2021-03-13 14:26:12 -07:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2021-04-30 15:55:37 -07:00
|
|
|
<div class="col col-md-12">
|
2021-07-21 11:20:35 -04:00
|
|
|
{% if duplicate_prefix_table.rows %}
|
|
|
|
{% include 'inc/panel_table.html' with table=duplicate_prefix_table heading='Duplicate Prefixes' %}
|
|
|
|
{% endif %}
|
|
|
|
{% include 'inc/panel_table.html' with table=parent_prefix_table heading='Parent Prefixes' %}
|
2021-03-13 14:26:12 -07:00
|
|
|
{% plugin_full_width_page object %}
|
2018-06-14 13:14:35 -04:00
|
|
|
</div>
|
2021-03-13 14:26:12 -07:00
|
|
|
</div>
|
2022-08-16 10:04:47 -04:00
|
|
|
{% 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>
|
2022-07-23 20:24:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-16 10:04:47 -04:00
|
|
|
{% endif %}
|
2016-03-01 11:23:03 -05:00
|
|
|
{% endblock %}
|