2021-03-29 16:43:29 -04:00
|
|
|
{% extends 'ipam/vlan/base.html' %}
|
2018-05-18 11:09:11 -04:00
|
|
|
{% load helpers %}
|
2021-09-15 12:41:21 -04:00
|
|
|
{% load render_table from django_tables2 %}
|
2020-03-15 23:45:18 -04:00
|
|
|
{% load plugins %}
|
2016-03-01 11:23:03 -05:00
|
|
|
|
2018-06-14 13:14:35 -04:00
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
2021-07-21 11:20:35 -04:00
|
|
|
<div class="col col-md-6">
|
2021-03-13 02:19:42 -07:00
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">
|
|
|
|
VLAN
|
|
|
|
</h5>
|
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-hover attr-table">
|
2021-04-13 21:51:12 -07:00
|
|
|
<tr>
|
|
|
|
<th scope="row">Site</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>
|
|
|
|
{% if object.site %}
|
|
|
|
{% if object.site.region %}
|
2022-03-22 14:51:20 -04:00
|
|
|
{{ object.site.region|linkify }} /
|
2021-03-13 02:19:42 -07:00
|
|
|
{% endif %}
|
2022-03-22 14:51:20 -04:00
|
|
|
{{ object.site|linkify }}
|
2021-03-13 02:19:42 -07:00
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-03-13 02:19:42 -07:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Group</th>
|
2022-03-22 14:51:20 -04:00
|
|
|
<td>{{ object.group|linkify|placeholder }}</td>
|
2021-03-13 02:19:42 -07:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">VLAN ID</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>{{ object.vid }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Name</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>{{ object.name }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Tenant</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>
|
2022-03-22 15:29:05 -04:00
|
|
|
{% if object.tenant.group %}
|
|
|
|
{{ object.tenant.group|linkify }} /
|
2018-06-14 13:14:35 -04:00
|
|
|
{% endif %}
|
2022-03-22 15:29:05 -04:00
|
|
|
{{ object.tenant|linkify|placeholder }}
|
2021-03-13 02:19:42 -07:00
|
|
|
</td>
|
|
|
|
</tr>
|
2021-07-21 11:20:35 -04:00
|
|
|
<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-07-21 11:20:35 -04:00
|
|
|
</tr>
|
2021-03-13 02:19:42 -07:00
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Role</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>
|
|
|
|
{% if object.role %}
|
|
|
|
<a href="{% url 'ipam:vlan_list' %}?role={{ object.role.slug }}">{{ object.role }}</a>
|
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2018-06-14 13:14:35 -04:00
|
|
|
{% endif %}
|
2021-03-13 02:19:42 -07:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Description</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>{{ object.description|placeholder }}</td>
|
|
|
|
</tr>
|
2022-06-29 16:01:20 -05:00
|
|
|
<tr>
|
|
|
|
<th scope="row">L2VPN</th>
|
|
|
|
<td>{{ object.l2vpn_termination.l2vpn|linkify|placeholder }}</td>
|
|
|
|
</tr>
|
2021-03-13 02:19:42 -07:00
|
|
|
</table>
|
|
|
|
</div>
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
2021-07-21 11:20:35 -04:00
|
|
|
{% plugin_left_page object %}
|
|
|
|
</div>
|
|
|
|
<div class="col col-md-6">
|
2022-11-04 08:28:09 -04:00
|
|
|
{% include 'inc/panels/custom_fields.html' %}
|
|
|
|
{% include 'inc/panels/tags.html' %}
|
|
|
|
{% include 'inc/panels/comments.html' %}
|
|
|
|
{% plugin_right_page object %}
|
2018-06-14 13:14:35 -04:00
|
|
|
</div>
|
2021-07-21 11:20:35 -04:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2023-01-16 15:50:45 -05:00
|
|
|
<div class="col col-md-12">
|
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">Prefixes</h5>
|
|
|
|
<div class="card-body htmx-container table-responsive"
|
|
|
|
hx-get="{% url 'ipam:prefix_list' %}?vlan_id={{ object.pk }}"
|
|
|
|
hx-trigger="load"
|
|
|
|
></div>
|
|
|
|
{% if perms.ipam.add_prefix %}
|
|
|
|
<div class="card-footer text-end noprint">
|
|
|
|
<a href="{% url 'ipam:prefix_add' %}?{% if object.tenant %}tenant={{ object.tenant.pk }}&{% endif %}site={{ object.site.pk }}&vlan={{ object.pk }}" class="btn btn-primary btn-sm">
|
|
|
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add a Prefix
|
|
|
|
</a>
|
2018-06-14 13:14:35 -04:00
|
|
|
</div>
|
2023-01-16 15:50:45 -05:00
|
|
|
{% endif %}
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
2023-01-16 15:50:45 -05:00
|
|
|
{% plugin_full_width_page object %}
|
|
|
|
</div>
|
2018-06-14 13:14:35 -04:00
|
|
|
</div>
|
2016-03-01 11:23:03 -05:00
|
|
|
{% endblock %}
|