2020-04-10 10:21:02 -04:00
|
|
|
{% extends 'base.html' %}
|
2019-12-06 16:13:52 -05:00
|
|
|
{% load buttons %}
|
2019-04-15 21:38:04 -04:00
|
|
|
{% load custom_links %}
|
2018-05-18 11:09:11 -04:00
|
|
|
{% load helpers %}
|
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 header %}
|
2019-03-05 15:42:47 -06:00
|
|
|
<div class="row noprint">
|
2018-06-14 13:14:35 -04:00
|
|
|
<div class="col-sm-8 col-md-9">
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li><a href="{% url 'ipam:vlan_list' %}">VLANs</a></li>
|
2020-11-19 12:24:52 -05:00
|
|
|
{% if object.site %}
|
|
|
|
<li><a href="{% url 'ipam:vlan_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li>
|
2018-06-14 13:14:35 -04:00
|
|
|
{% endif %}
|
2020-11-19 12:24:52 -05:00
|
|
|
{% if object.group %}
|
|
|
|
<li><a href="{% url 'ipam:vlan_list' %}?group={{ object.group.slug }}">{{ object.group }}</a></li>
|
2018-06-14 13:14:35 -04:00
|
|
|
{% endif %}
|
2020-11-19 12:24:52 -05:00
|
|
|
<li>{{ object }}</li>
|
2018-06-14 13:14:35 -04:00
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-4 col-md-3">
|
|
|
|
<form action="{% url 'ipam:vlan_list' %}" method="get">
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" name="q" class="form-control" placeholder="Search VLANs" />
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<button type="submit" class="btn btn-primary">
|
2020-11-06 14:33:20 -05:00
|
|
|
<span class="mdi mdi-magnify" aria-hidden="true"></span>
|
2018-06-14 13:14:35 -04:00
|
|
|
</button>
|
|
|
|
</span>
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
2018-06-14 13:14:35 -04:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-03-05 15:42:47 -06:00
|
|
|
<div class="pull-right noprint">
|
2020-11-19 12:24:52 -05:00
|
|
|
{% plugin_buttons object %}
|
2019-12-06 16:13:52 -05:00
|
|
|
{% if perms.ipam.add_vlan %}
|
2020-11-19 12:24:52 -05:00
|
|
|
{% clone_button object %}
|
2019-12-06 16:13:52 -05:00
|
|
|
{% endif %}
|
2018-06-14 13:14:35 -04:00
|
|
|
{% if perms.ipam.change_vlan %}
|
2020-11-19 12:24:52 -05:00
|
|
|
{% edit_button object %}
|
2018-06-14 13:14:35 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.ipam.delete_vlan %}
|
2020-11-19 12:24:52 -05:00
|
|
|
{% delete_button object %}
|
2018-06-14 13:14:35 -04:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-11-19 12:24:52 -05:00
|
|
|
<h1>{% block title %}VLAN {{ object.display_name }}{% endblock %}</h1>
|
|
|
|
{% include 'inc/created_updated.html' with obj=object %}
|
2019-04-15 21:38:04 -04:00
|
|
|
<div class="pull-right noprint">
|
2020-11-19 12:24:52 -05:00
|
|
|
{% custom_links object %}
|
2019-04-15 21:38:04 -04:00
|
|
|
</div>
|
2018-06-14 13:14:35 -04:00
|
|
|
<ul class="nav nav-tabs" style="margin-bottom: 20px">
|
2018-06-14 16:15:14 -04:00
|
|
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
2020-11-19 12:24:52 -05:00
|
|
|
<a href="{% url 'ipam:vlan' pk=object.pk %}">VLAN</a>
|
2018-06-14 16:15:14 -04:00
|
|
|
</li>
|
2020-09-23 11:48:32 -04:00
|
|
|
<li role="presentation"{% if active_tab == 'interfaces' %} class="active"{% endif %}>
|
2020-11-19 12:24:52 -05:00
|
|
|
<a href="{% url 'ipam:vlan_interfaces' pk=object.pk %}">Device Interfaces <span class="badge">{{ object.get_interfaces.count }}</span></a>
|
2020-09-23 11:48:32 -04:00
|
|
|
</li>
|
|
|
|
<li role="presentation"{% if active_tab == 'vminterfaces' %} class="active"{% endif %}>
|
2020-11-19 12:24:52 -05:00
|
|
|
<a href="{% url 'ipam:vlan_vminterfaces' pk=object.pk %}">VM Interfaces <span class="badge">{{ object.get_vminterfaces.count }}</span></a>
|
2018-06-14 16:15:14 -04:00
|
|
|
</li>
|
2019-04-12 09:29:36 -04:00
|
|
|
{% if perms.extras.view_objectchange %}
|
|
|
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
2020-11-19 12:24:52 -05:00
|
|
|
<a href="{% url 'ipam:vlan_changelog' pk=object.pk %}">Change Log</a>
|
2019-04-12 09:29:36 -04:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
2018-06-14 13:14:35 -04:00
|
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
2019-04-22 07:47:16 -04:00
|
|
|
<div class="col-md-4">
|
2018-06-14 13:14:35 -04:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<strong>VLAN</strong>
|
|
|
|
</div>
|
|
|
|
<table class="table table-hover panel-body attr-table">
|
|
|
|
<tr>
|
|
|
|
<td>Site</td>
|
|
|
|
<td>
|
2020-11-19 12:24:52 -05:00
|
|
|
{% if object.site %}
|
|
|
|
{% if object.site.region %}
|
|
|
|
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
|
2018-06-14 13:14:35 -04:00
|
|
|
{% endif %}
|
2020-11-19 12:24:52 -05:00
|
|
|
<a href="{% url 'dcim:site' slug=object.site.slug %}">{{ object.site }}</a>
|
2018-06-14 13:14:35 -04:00
|
|
|
{% else %}
|
|
|
|
<span class="text-muted">None</span>
|
2017-02-28 12:11:43 -05:00
|
|
|
{% endif %}
|
2018-06-14 13:14:35 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Group</td>
|
|
|
|
<td>
|
2020-11-19 12:24:52 -05:00
|
|
|
{% if object.group %}
|
|
|
|
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
|
2018-06-14 13:14:35 -04:00
|
|
|
{% else %}
|
|
|
|
<span class="text-muted">None</span>
|
2017-02-28 12:11:43 -05:00
|
|
|
{% endif %}
|
2018-06-14 13:14:35 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>VLAN ID</td>
|
2020-11-19 12:24:52 -05:00
|
|
|
<td>{{ object.vid }}</td>
|
2018-06-14 13:14:35 -04:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Name</td>
|
2020-11-19 12:24:52 -05:00
|
|
|
<td>{{ object.name }}</td>
|
2018-06-14 13:14:35 -04:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Tenant</td>
|
|
|
|
<td>
|
2020-11-19 12:24:52 -05:00
|
|
|
{% if object.tenant %}
|
|
|
|
{% if object.tenant.group %}
|
|
|
|
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
2018-06-14 13:14:35 -04:00
|
|
|
{% endif %}
|
2020-11-19 12:24:52 -05:00
|
|
|
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
2018-06-14 13:14:35 -04:00
|
|
|
{% else %}
|
|
|
|
<span class="text-muted">None</span>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Status</td>
|
|
|
|
<td>
|
2020-11-19 12:24:52 -05:00
|
|
|
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
2018-06-14 13:14:35 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Role</td>
|
|
|
|
<td>
|
2020-11-19 12:24:52 -05:00
|
|
|
{% if object.role %}
|
|
|
|
<a href="{% url 'ipam:vlan_list' %}?role={{ object.role.slug }}">{{ object.role }}</a>
|
2018-06-14 13:14:35 -04:00
|
|
|
{% else %}
|
|
|
|
<span class="text-muted">None</span>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Description</td>
|
2020-11-19 12:24:52 -05:00
|
|
|
<td>{{ object.description|placeholder }}</td>
|
2018-06-14 13:14:35 -04:00
|
|
|
</tr>
|
|
|
|
</table>
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
2020-11-19 12:24:52 -05:00
|
|
|
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
|
|
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:vlan_list' %}
|
|
|
|
{% plugin_left_page object %}
|
2018-06-14 13:14:35 -04:00
|
|
|
</div>
|
2019-04-22 07:47:16 -04:00
|
|
|
<div class="col-md-8">
|
2018-06-14 13:14:35 -04:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<strong>Prefixes</strong>
|
2016-08-06 15:44:28 -04:00
|
|
|
</div>
|
2018-06-14 13:14:35 -04:00
|
|
|
{% include 'responsive_table.html' with table=prefix_table %}
|
|
|
|
{% if perms.ipam.add_prefix %}
|
2019-03-05 15:42:47 -06:00
|
|
|
<div class="panel-footer text-right noprint">
|
2020-11-19 12:24:52 -05:00
|
|
|
<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-xs">
|
2020-11-06 14:49:14 -05:00
|
|
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
2018-06-14 13:14:35 -04:00
|
|
|
Add a prefix
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-11-19 12:24:52 -05:00
|
|
|
{% plugin_right_page object %}
|
2020-03-15 23:45:18 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2020-11-19 12:24:52 -05:00
|
|
|
{% plugin_full_width_page object %}
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
2018-06-14 13:14:35 -04:00
|
|
|
</div>
|
2016-03-01 11:23:03 -05:00
|
|
|
{% endblock %}
|