| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- {% extends 'ipam/vlan/base.html' %}
- {% load helpers %}
- {% load render_table from django_tables2 %}
- {% load plugins %}
- {% block content %}
- <div class="row">
- <div class="col col-md-6">
- <div class="card">
- <h5 class="card-header">
- VLAN
- </h5>
- <div class="card-body">
- <table class="table table-hover attr-table">
- <tr>
- <th scope="row">Site</th>
- <td>
- {% if object.site %}
- {% if object.site.region %}
- <a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
- {% endif %}
- <a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <th scope="row">Group</th>
- <td>
- {% if object.group %}
- <a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <th scope="row">VLAN ID</th>
- <td>{{ object.vid }}</td>
- </tr>
- <tr>
- <th scope="row">Name</th>
- <td>{{ object.name }}</td>
- </tr>
- <tr>
- <th scope="row">Tenant</th>
- <td>
- {% if object.tenant %}
- {% if object.tenant.group %}
- <a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
- {% endif %}
- <a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <th scope="row">Status</th>
- <td>
- <span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Role</th>
- <td>
- {% if object.role %}
- <a href="{% url 'ipam:vlan_list' %}?role={{ object.role.slug }}">{{ object.role }}</a>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <th scope="row">Description</th>
- <td>{{ object.description|placeholder }}</td>
- </tr>
- </table>
- </div>
- </div>
- {% plugin_left_page object %}
- </div>
- <div class="col col-md-6">
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/tags.html' %}
- {% plugin_right_page object %}
- </div>
- </div>
- <div class="row">
- <div class="col col-md-12">
- <div class="card">
- <h5 class="card-header">
- Prefixes
- </h5>
- <div class="card-body table-responsive">
- {% render_table prefix_table 'inc/table.html' %}
- </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>
- </div>
- {% endif %}
- </div>
- {% plugin_full_width_page object %}
- </div>
- </div>
- {% endblock %}
|