mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Introduce linkify template filter
This commit is contained in:
parent
dc92e19f76
commit
75dae5fbe8
@ -230,6 +230,8 @@ The following custom template filters are available in NetBox.
|
|||||||
|
|
||||||
::: utilities.templatetags.builtins.filters.content_type_id
|
::: utilities.templatetags.builtins.filters.content_type_id
|
||||||
|
|
||||||
|
::: utilities.templatetags.builtins.filters.linkify
|
||||||
|
|
||||||
::: utilities.templatetags.builtins.filters.meta
|
::: utilities.templatetags.builtins.filters.meta
|
||||||
|
|
||||||
::: utilities.templatetags.builtins.filters.placeholder
|
::: utilities.templatetags.builtins.filters.placeholder
|
||||||
|
@ -18,9 +18,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Provider</th>
|
<th scope="row">Provider</th>
|
||||||
<td>
|
<td>{{ object.provider|linkify }}</td>
|
||||||
<a href="{{ object.provider.get_absolute_url }}">{{ object.provider }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Circuit ID</th>
|
<th scope="row">Circuit ID</th>
|
||||||
@ -28,7 +26,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Type</th>
|
<th scope="row">Type</th>
|
||||||
<td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td>
|
<td>{{ object.type|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Status</th>
|
<th scope="row">Status</th>
|
||||||
@ -39,9 +37,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
<td>Site</td>
|
<td>Site</td>
|
||||||
<td>
|
<td>
|
||||||
{% if termination.site.region %}
|
{% if termination.site.region %}
|
||||||
<a href="{{ termination.site.region.get_absolute_url }}">{{ termination.site.region }}</a> /
|
{{ termination.site.region|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ termination.site.get_absolute_url }}">{{ termination.site }}</a>
|
{{ termination.site|linkify }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -48,11 +48,11 @@
|
|||||||
{% with peer=termination.get_link_peer %}
|
{% with peer=termination.get_link_peer %}
|
||||||
to
|
to
|
||||||
{% if peer.device %}
|
{% if peer.device %}
|
||||||
<a href="{{ peer.device.get_absolute_url }}">{{ peer.device }}</a><br/>
|
{{ peer.device|linkify }}<br/>
|
||||||
{% elif peer.circuit %}
|
{% elif peer.circuit %}
|
||||||
<a href="{{ peer.circuit.get_absolute_url }}">{{ peer.circuit }}</a><br/>
|
{{ peer.circuit|linkify }}<br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ peer.get_absolute_url }}">{{ peer }}</a>
|
{{ peer|linkify }}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<a href="{% url 'circuits:circuittermination_trace' pk=termination.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'circuits:circuittermination_trace' pk=termination.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
@ -82,9 +82,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Provider Network</td>
|
<td>Provider Network</td>
|
||||||
<td>
|
<td>{{ termination.provider_network|linkify }}</td>
|
||||||
<a href="{{ termination.provider_network.get_absolute_url }}">{{ termination.provider_network }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -20,9 +20,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Provider</th>
|
<th scope="row">Provider</th>
|
||||||
<td>
|
<td>{{ object.provider|linkify }}</td>
|
||||||
<a href="{{ object.provider.get_absolute_url }}">{{ object.provider }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
{% if next_node.cable %}
|
{% if next_node.cable %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'dcim:frontport_trace' pk=next_node.pk %}">{{ next_node }}</a>
|
<a href="{% url 'dcim:frontport_trace' pk=next_node.pk %}">{{ next_node }}</a>
|
||||||
(Cable <a href="{{ next_node.cable.get_absolute_url }}">{{ next_node.cable }}</a>)
|
(Cable {{ next_node.cable|linkify }})
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="text-muted">{{ next_node }}</li>
|
<li class="text-muted">{{ next_node }}</li>
|
||||||
|
@ -20,19 +20,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module</th>
|
<th scope="row">Module</th>
|
||||||
<td>
|
<td>{{ object.module|linkify|placeholder }}</td>
|
||||||
{% if object.module %}
|
|
||||||
<a href="{{ object.module.get_absolute_url }}">{{ object.module }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ None|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -74,7 +66,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Cable</th>
|
<th scope="row">Cable</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:consoleport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:consoleport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
@ -83,9 +75,7 @@
|
|||||||
{% if object.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.connected_endpoint.device|linkify }}</td>
|
||||||
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
|
@ -20,19 +20,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module</th>
|
<th scope="row">Module</th>
|
||||||
<td>
|
<td>{{ object.module|linkify|placeholder }}</td>
|
||||||
{% if object.module %}
|
|
||||||
<a href="{{ object.module.get_absolute_url }}">{{ object.module }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ None|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -74,7 +66,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Cable</th>
|
<th scope="row">Cable</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:consoleserverport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:consoleserverport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
@ -84,7 +76,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
{{ object.connected_endpoint.device|linkify }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -19,28 +19,26 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.site.region %}
|
{% if object.site.region %}
|
||||||
{% for region in object.site.region.get_ancestors %}
|
{% for region in object.site.region.get_ancestors %}
|
||||||
<a href="{{ region.get_absolute_url }}">{{ region }}</a> /
|
{{ region|linkify }} /
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a>
|
{{ object.site.region|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Site</th>
|
<th scope="row">Site</th>
|
||||||
<td>
|
<td>{{ object.site|linkify }}</td>
|
||||||
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Location</th>
|
<th scope="row">Location</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.location %}
|
{% if object.location %}
|
||||||
{% for location in object.location.get_ancestors %}
|
{% for location in object.location.get_ancestors %}
|
||||||
<a href="{{ location.get_absolute_url }}">{{ location }}</a> /
|
{{ location|linkify }} /
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a>
|
{{ object.location|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -61,7 +59,7 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.parent_bay %}
|
{% if object.parent_bay %}
|
||||||
{% with object.parent_bay.device as parent %}
|
{% with object.parent_bay.device as parent %}
|
||||||
<a href="{{ parent.get_absolute_url }}">{{ parent }}</a> / {{ object.parent_bay }}
|
{{ parent|linkify }} / {{ object.parent_bay }}
|
||||||
{% if parent.position %}
|
{% if parent.position %}
|
||||||
(U{{ parent.position }} / {{ parent.get_face_display }})
|
(U{{ parent.position }} / {{ parent.get_face_display }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -80,9 +78,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -91,7 +89,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device Type</th>
|
<th scope="row">Device Type</th>
|
||||||
<td>
|
<td>
|
||||||
<span><a href="{{ object.device_type.get_absolute_url }}">{{ object.device_type }}</a> ({{ object.device_type.u_height }}U)</span>
|
{{ object.device_type|linkify }} ({{ object.device_type.u_height }}U)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -127,7 +125,7 @@
|
|||||||
{% for vc_member in vc_members %}
|
{% for vc_member in vc_members %}
|
||||||
<tr{% if vc_member == object %} class="info"{% endif %}>
|
<tr{% if vc_member == object %} class="info"{% endif %}>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a>
|
{{ vc_member|linkify }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% badge vc_member.vc_position show_empty=True %}
|
{% badge vc_member.vc_position show_empty=True %}
|
||||||
@ -173,13 +171,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Platform</th>
|
<th scope="row">Platform</th>
|
||||||
<td>
|
<td>{{ object.platform|linkify|placeholder }}</td>
|
||||||
{% if object.platform %}
|
|
||||||
<a href="{{ object.platform.get_absolute_url }}">{{ object.platform }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Primary IPv4</th>
|
<th scope="row">Primary IPv4</th>
|
||||||
@ -187,9 +179,9 @@
|
|||||||
{% if object.primary_ip4 %}
|
{% if object.primary_ip4 %}
|
||||||
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip4.pk %}">{{ object.primary_ip4.address.ip }}</a>
|
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip4.pk %}">{{ object.primary_ip4.address.ip }}</a>
|
||||||
{% if object.primary_ip4.nat_inside %}
|
{% if object.primary_ip4.nat_inside %}
|
||||||
(NAT for <a href="{{ object.primary_ip4.nat_inside.get_absolute_url }}">{{ object.primary_ip4.nat_inside.address.ip }}</a>)
|
(NAT for {{ object.primary_ip4.nat_inside.address.ip|linkify }})
|
||||||
{% elif object.primary_ip4.nat_outside %}
|
{% elif object.primary_ip4.nat_outside %}
|
||||||
(NAT: <a href="{{ object.primary_ip4.nat_outside.get_absolute_url }}">{{ object.primary_ip4.nat_outside.address.ip }}</a>)
|
(NAT: {{ object.primary_ip4.nat_outside.address.ip|linkify }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
@ -202,9 +194,9 @@
|
|||||||
{% if object.primary_ip6 %}
|
{% if object.primary_ip6 %}
|
||||||
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip6.pk %}">{{ object.primary_ip6.address.ip }}</a>
|
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip6.pk %}">{{ object.primary_ip6.address.ip }}</a>
|
||||||
{% if object.primary_ip6.nat_inside %}
|
{% if object.primary_ip6.nat_inside %}
|
||||||
(NAT for <a href="{{ object.primary_ip6.nat_inside.get_absolute_url }}">{{ object.primary_ip6.nat_inside.address.ip }}</a>)
|
(NAT for {{ object.primary_ip6.nat_inside.address.ip|linkify }})
|
||||||
{% elif object.primary_ip6.nat_outside %}
|
{% elif object.primary_ip6.nat_outside %}
|
||||||
(NAT: <a href="{{ object.primary_ip6.nat_outside.get_absolute_url }}">{{ object.primary_ip6.nat_outside.address.ip }}</a>)
|
(NAT: {{ object.primary_ip6.nat_outside.address.ip|linkify }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
@ -216,9 +208,9 @@
|
|||||||
<th>Cluster</th>
|
<th>Cluster</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.cluster.group %}
|
{% if object.cluster.group %}
|
||||||
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
|
{{ object.cluster.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
|
{{ object.cluster|linkify }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -20,9 +20,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -54,9 +52,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ device|linkify }}</td>
|
||||||
<a href="{{ device.get_absolute_url }}">{{ device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device Type</th>
|
<th scope="row">Device Type</th>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Manufacturer</td>
|
<td>Manufacturer</td>
|
||||||
<td><a href="{{ object.manufacturer.get_absolute_url }}">{{ object.manufacturer }}</a></td>
|
<td>{{ object.manufacturer|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Model Name</td>
|
<td>Model Name</td>
|
||||||
|
@ -20,19 +20,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module</th>
|
<th scope="row">Module</th>
|
||||||
<td>
|
<td>{{ object.module|linkify|placeholder }}</td>
|
||||||
{% if object.module %}
|
|
||||||
<a href="{{ object.module.get_absolute_url }}">{{ object.module }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ None|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -54,9 +46,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Rear Port</th>
|
<th scope="row">Rear Port</th>
|
||||||
<td>
|
<td>{{ object.rear_port|linkify }}</td>
|
||||||
<a href="{{ object.rear_port.get_absolute_url }}">{{ object.rear_port }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Rear Port Position</th>
|
<th scope="row">Rear Port Position</th>
|
||||||
@ -88,7 +78,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Cable</th>
|
<th scope="row">Cable</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:frontport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:frontport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -4,51 +4,35 @@
|
|||||||
{# Device component #}
|
{# Device component #}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>{{ termination.device|linkify }}</td>
|
||||||
<a href="{{ termination.device.get_absolute_url }}">{{ termination.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% if termination.device.site %}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Site</td>
|
<td>Site</td>
|
||||||
<td>
|
<td>{{ termination.device.site|linkify }}</td>
|
||||||
<a href="{{ termination.device.site.get_absolute_url }}">{{ termination.device.site }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
|
||||||
{% if termination.device.rack %}
|
{% if termination.device.rack %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Rack</td>
|
<td>Rack</td>
|
||||||
<td>
|
<td>{{ termination.device.rack|linkify }}</td>
|
||||||
<a href="{{ termination.device.rack.get_absolute_url }}">{{ termination.device.rack }}</a>
|
</tr>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>
|
<td>{{ termination|meta:"verbose_name"|capfirst }}</td>
|
||||||
{{ termination|meta:"verbose_name"|capfirst }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Component</td>
|
<td>Component</td>
|
||||||
<td>
|
<td>{{ termination|linkify }}</td>
|
||||||
<a href="{{ termination.get_absolute_url }}">{{ termination }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
{# Circuit termination #}
|
{# Circuit termination #}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Provider</td>
|
<td>Provider</td>
|
||||||
<td>
|
<td>{{ termination.circuit.provider|linkify }}</td>
|
||||||
<a href="{{ termination.circuit.provider.get_absolute_url }}">{{ termination.circuit.provider }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Circuit</td>
|
<td>Circuit</td>
|
||||||
<td>
|
<td>{{ termination.|linkify }} ({{ termination }})</td>
|
||||||
<a href="{{ termination.circuit.get_absolute_url }}">{{ termination.circuit }}</a> ({{ termination }})
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
{{ termination.parent_object }}
|
{{ termination.parent_object }}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ termination.parent_object.get_absolute_url }}">{{ termination.parent_object }}</a>
|
{{ termination.parent_object|linkify }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ termination.get_absolute_url }}">{{ termination }}</a>
|
{{ termination|linkify }}
|
||||||
</td>
|
</td>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% if path.destination_id %}
|
{% if path.destination_id %}
|
||||||
{% with endpoint=path.destination %}
|
{% with endpoint=path.destination %}
|
||||||
<td><a href="{{ endpoint.parent_object.get_absolute_url }}">{{ endpoint.parent_object }}</a></td>
|
<td>{{ endpoint.parent_object|linkify }}</td>
|
||||||
<td><a href="{{ endpoint.get_absolute_url }}">{{ endpoint }}</a></td>
|
<td>{{ endpoint|linkify }}</td>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<td colspan="2" class="text-muted">Not connected</td>
|
<td colspan="2" class="text-muted">Not connected</td>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<td>{{ device.device_role }}</td>
|
<td>{{ device.device_role }}</td>
|
||||||
<td>{{ device.device_type }}</td>
|
<td>{{ device.device_type }}</td>
|
||||||
{% if device.parent_bay %}
|
{% if device.parent_bay %}
|
||||||
<td><a href="{{ device.parent_bay.device.get_absolute_url }}">{{ device.parent_bay.device }}</a></td>
|
<td>{{ device.parent_bay.device|linkify }}</td>
|
||||||
<td>{{ device.parent_bay }}</td>
|
<td>{{ device.parent_bay }}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td colspan="2" class="text-muted">—</td>
|
<td colspan="2" class="text-muted">—</td>
|
||||||
|
@ -15,19 +15,9 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for item in object.inventory_items.all %}
|
{% for item in object.inventory_items.all %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td><a href="{{ item.get_absolute_url }}">{{ item.name }}</a></td>
|
||||||
<a href="{{ item.get_absolute_url }}">{{ item.name }}</a>
|
<td>{{ item.label|placeholder }}</td>
|
||||||
</td>
|
<td>{{ item.role|linkify|placeholder }}</td>
|
||||||
<td>
|
|
||||||
{{ item.label|placeholder }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if item.role %}
|
|
||||||
<a href="{{ item.role.get_absolute_url }}">{{ item.role }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td class="text-end noprint">
|
<td class="text-end noprint">
|
||||||
{% if perms.dcim.change_inventoryitem %}
|
{% if perms.dcim.change_inventoryitem %}
|
||||||
<a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-sm lh-1" title="Edit">
|
<a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-sm lh-1" title="Edit">
|
||||||
|
@ -30,19 +30,11 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module</th>
|
<th scope="row">Module</th>
|
||||||
<td>
|
<td>{{ object.module|linkify|placeholder }}</td>
|
||||||
{% if object.module %}
|
|
||||||
<a href="{{ object.module.get_absolute_url }}">{{ object.module }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ None|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -74,33 +66,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Bridge</th>
|
<th scope="row">Bridge</th>
|
||||||
<td>
|
<td>{{ object.bridge|linkify|placeholder }}</td>
|
||||||
{% if object.bridge %}
|
|
||||||
<a href="{{ object.bridge.get_absolute_url }}">{{ object.bridge }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">LAG</th>
|
<th scope="row">LAG</th>
|
||||||
<td>
|
<td>{{ object.lag|linkify|placeholder }}</td>
|
||||||
{% if object.lag%}
|
|
||||||
<a href="{{ object.lag.get_absolute_url }}">{{ object.lag }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Description</th>
|
<th scope="row">Description</th>
|
||||||
@ -128,13 +102,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">VRF</th>
|
<th scope="row">VRF</th>
|
||||||
<td>
|
<td>{{ object.vrf|linkify|placeholder }}</td>
|
||||||
{% if object.vrf %}
|
|
||||||
<a href="{{ object.vrf.get_absolute_url }}">{{ object.vrf }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -170,7 +138,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Cable</th>
|
<th scope="row">Cable</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:interface_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:interface_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
@ -180,9 +148,7 @@
|
|||||||
{% with iface=object.connected_endpoint %}
|
{% with iface=object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ iface.device|linkify }}</td>
|
||||||
<a href="{{ iface.device.get_absolute_url }}">{{ iface.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -196,13 +162,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">LAG</th>
|
<th scope="row">LAG</th>
|
||||||
<td>
|
<td>{{ iface.lag|linkify|placeholder }}</td>
|
||||||
{% if iface.lag%}
|
|
||||||
<a href="{{ iface.lag.get_absolute_url }}">{{ iface.lag }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Description</th>
|
<th scope="row">Description</th>
|
||||||
@ -225,11 +185,11 @@
|
|||||||
{% with ct=object.connected_endpoint %}
|
{% with ct=object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Provider</th>
|
<th scope="row">Provider</th>
|
||||||
<td><a href="{{ ct.circuit.provider.get_absolute_url }}">{{ ct.circuit.provider }}</a></td>
|
<td>{{ ct.circuit.provider|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Circuit</th>
|
<th scope="row">Circuit</th>
|
||||||
<td><a href="{{ ct.circuit.get_absolute_url }}">{{ ct.circuit }}</a></td>
|
<td>{{ ct.circuit|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Side</th>
|
<th scope="row">Side</th>
|
||||||
@ -253,7 +213,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Wireless Link</th>
|
<th scope="row">Wireless Link</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.wireless_link.get_absolute_url }}">{{ object.wireless_link }}</a>
|
{{ object.wireless_link|linkify }}
|
||||||
<a href="{% url 'dcim:interface_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:interface_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
@ -262,15 +222,11 @@
|
|||||||
{% with peer_interface=object.connected_endpoint %}
|
{% with peer_interface=object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ peer_interface.device|linkify }}</td>
|
||||||
<a href="{{ peer_interface.device.get_absolute_url }}">{{ peer_interface.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
<td>
|
<td>{{ peer_interface|linkify }}</td>
|
||||||
<a href="{{ peer_interface.get_absolute_url }}">{{ peer_interface }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Type</th>
|
<th scope="row">Type</th>
|
||||||
@ -409,7 +365,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{% if wlan.group %}
|
{% if wlan.group %}
|
||||||
<a href="{{ wlan.group.get_absolute_url }}">{{ wlan.group }}</a>
|
{{ wlan.group|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
—
|
—
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -443,15 +399,9 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for member in object.member_interfaces.all %}
|
{% for member in object.member_interfaces.all %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>{{ member.device|linkify }}</td>
|
||||||
<a href="{{ member.device.get_absolute_url }}">{{ member.device }}</a>
|
<td>{{ member|linkify }}</td>
|
||||||
</td>
|
<td>{{ member.get_type_display }}</td>
|
||||||
<td>
|
|
||||||
<a href="{{ member.get_absolute_url }}">{{ member }}</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ member.get_type_display }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -18,19 +18,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent Item</th>
|
<th scope="row">Parent Item</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -42,33 +34,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Role</th>
|
<th scope="row">Role</th>
|
||||||
<td>
|
<td>{{ object.role|linkify|placeholder }}</td>
|
||||||
{% if object.role %}
|
|
||||||
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Component</th>
|
<th scope="row">Component</th>
|
||||||
<td>
|
<td>{{ object.component|linkify|placeholder }}</td>
|
||||||
{% if object.component %}
|
|
||||||
<a href="{{ object.component.get_absolute_url }}">{{ object.component }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Manufacturer</th>
|
<th scope="row">Manufacturer</th>
|
||||||
<td>
|
<td>{{ object.manufacturer|linkify|placeholder }}</td>
|
||||||
{% if object.manufacturer %}
|
|
||||||
<a href="{{ object.manufacturer.get_absolute_url }}">{{ object.manufacturer }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Part ID</th>
|
<th scope="row">Part ID</th>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{% block breadcrumbs %}
|
{% block breadcrumbs %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% for location in object.get_ancestors %}
|
{% for location in object.get_ancestors %}
|
||||||
<li class="breadcrumb-item"><a href="{{ location.get_absolute_url }}">{{ location }}</a></li>
|
<li class="breadcrumb-item">{{ location|linkify }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@ -37,26 +37,20 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Site</th>
|
<th scope="row">Site</th>
|
||||||
<td><a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a></td>
|
<td>{{ object.site|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Tenant</th>
|
<th scope="row">Tenant</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -19,21 +19,15 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device Type</th>
|
<th scope="row">Device Type</th>
|
||||||
<td>
|
<td>{{ object.device.device_type|linkify }}</td>
|
||||||
<a href="{{ object.device.device_type.get_absolute_url }}">{{ object.device.device_type }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module Type</th>
|
<th scope="row">Module Type</th>
|
||||||
<td>
|
<td>{{ object.module_type|linkify }}</td>
|
||||||
<a href="{{ object.module_type.get_absolute_url }}">{{ object.module_type }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Serial Number</th>
|
<th scope="row">Serial Number</th>
|
||||||
|
@ -54,15 +54,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Manufacturer</th>
|
<th scope="row">Manufacturer</th>
|
||||||
<td>
|
<td>{{ module.module_type.manufacturer|linkify }}</td>
|
||||||
<a href="{{ module.module_type.manufacturer.get_absolute_url }}">{{ module.module_type.manufacturer }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module Type</th>
|
<th scope="row">Module Type</th>
|
||||||
<td>
|
<td>{{ module.module_type|linkify }}</td>
|
||||||
<a href="{{ module.get_absolute_url }}">{{ module.module_type }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Manufacturer</td>
|
<td>Manufacturer</td>
|
||||||
<td><a href="{{ object.manufacturer.get_absolute_url }}">{{ object.manufacturer }}</a></td>
|
<td>{{ object.manufacturer|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Model Name</td>
|
<td>Model Name</td>
|
||||||
|
@ -37,13 +37,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Manufacturer</th>
|
<th scope="row">Manufacturer</th>
|
||||||
<td>
|
<td>{{ object.manufacturer|linkify|placeholder }}</td>
|
||||||
{% if object.manufacturer %}
|
|
||||||
<a href="{{ object.manufacturer.get_absolute_url }}">{{ object.manufacturer }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">NAPALM Driver</th>
|
<th scope="row">NAPALM Driver</th>
|
||||||
|
@ -24,19 +24,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Power Panel</th>
|
<th scope="row">Power Panel</th>
|
||||||
<td>
|
<td>{{ object.power_panel|linkify }}</td>
|
||||||
<a href="{{ object.power_panel.get_absolute_url }}">{{ object.power_panel }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Rack</th>
|
<th scope="row">Rack</th>
|
||||||
<td>
|
<td>{{ object.rack|linkify|placeholder }}</td>
|
||||||
{% if object.rack %}
|
|
||||||
<a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Type</th>
|
<th scope="row">Type</th>
|
||||||
@ -50,7 +42,7 @@
|
|||||||
<th scope="row">Connected Device</th>
|
<th scope="row">Connected Device</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a> ({{ object.connected_endpoint }})
|
{{ object.connected_endpoint.device|linkify }} ({{ object.connected_endpoint }})
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -122,7 +114,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Cable</th>
|
<th scope="row">Cable</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:powerfeed_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:powerfeed_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
@ -131,9 +123,7 @@
|
|||||||
{% if object.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.connected_endpoint.device|linkify }}</td>
|
||||||
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
|
@ -20,19 +20,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module</th>
|
<th scope="row">Module</th>
|
||||||
<td>
|
<td>{{ object.module|linkify|placeholder }}</td>
|
||||||
{% if object.module %}
|
|
||||||
<a href="{{ object.module.get_absolute_url }}">{{ object.module }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ None|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -80,7 +72,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Cable</th>
|
<th scope="row">Cable</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:poweroutlet_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:poweroutlet_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
@ -89,9 +81,7 @@
|
|||||||
{% if object.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.connected_endpoint.device|linkify }}</td>
|
||||||
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<li class="breadcrumb-item"><a href="{% url 'dcim:powerpanel_list' %}?site_id={{ object.site.pk }}">{{ object.site }}</a></li>
|
<li class="breadcrumb-item"><a href="{% url 'dcim:powerpanel_list' %}?site_id={{ object.site.pk }}">{{ object.site }}</a></li>
|
||||||
{% if object.location %}
|
{% if object.location %}
|
||||||
<li class="breadcrumb-item"><a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a></li>
|
<li class="breadcrumb-item">{{ object.location|linkify }}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@ -22,19 +22,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Site</th>
|
<th scope="row">Site</th>
|
||||||
<td>
|
<td>{{ object.site|linkify }}</td>
|
||||||
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Location</th>
|
<th scope="row">Location</th>
|
||||||
<td>
|
<td>{{ object.location|linkify|placeholder }}</td>
|
||||||
{% if object.location %}
|
|
||||||
<a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,19 +20,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module</th>
|
<th scope="row">Module</th>
|
||||||
<td>
|
<td>{{ object.module|linkify|placeholder }}</td>
|
||||||
{% if object.module %}
|
|
||||||
<a href="{{ object.module.get_absolute_url }}">{{ object.module }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ None|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -80,7 +72,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Cable</th>
|
<th scope="row">Cable</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:powerport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:powerport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
@ -89,9 +81,7 @@
|
|||||||
{% if object.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.connected_endpoint.device|linkify }}</td>
|
||||||
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
|
@ -39,9 +39,9 @@
|
|||||||
<th scope="row">Site</th>
|
<th scope="row">Site</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.site.region %}
|
{% if object.site.region %}
|
||||||
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
|
{{ object.site.region|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
|
{{ object.site|linkify }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -49,9 +49,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.location %}
|
{% if object.location %}
|
||||||
{% for location in object.location.get_ancestors %}
|
{% for location in object.location.get_ancestors %}
|
||||||
<a href="{{ location.get_absolute_url }}">{{ location }}</a> /
|
{{ location|linkify }} /
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a>
|
{{ object.location|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -66,9 +66,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }}/
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -80,13 +80,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Role</th>
|
<th scope="row">Role</th>
|
||||||
<td>
|
<td>{{ object.role|linkify|placeholder }}</td>
|
||||||
{% if object.role %}
|
|
||||||
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Serial Number</th>
|
<th scope="row">Serial Number</th>
|
||||||
@ -179,18 +173,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% for powerfeed in power_feeds %}
|
{% for powerfeed in power_feeds %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>{{ powerfeed.power_panel|linkify }}</td>
|
||||||
<a href="{{ powerfeed.power_panel.get_absolute_url }}">{{ powerfeed.power_panel.name }}</a>
|
<td>{{ powerfeed|linkify }}</td>
|
||||||
|
<td>{% badge powerfeed.get_status_display bg_color=powerfeed.get_status_color %}</td>
|
||||||
<td>
|
<td>{% badge powerfeed.get_type_display bg_color=powerfeed.get_type_color %}</td>
|
||||||
<a href="{{ powerfeed.get_absolute_url }}">{{ powerfeed.name }}</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% badge powerfeed.get_status_display bg_color=powerfeed.get_status_color %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% badge powerfeed.get_type_display bg_color=powerfeed.get_type_color %}
|
|
||||||
</td>
|
|
||||||
{% with power_port=powerfeed.connected_endpoint %}
|
{% with power_port=powerfeed.connected_endpoint %}
|
||||||
{% if power_port %}
|
{% if power_port %}
|
||||||
<td>{% utilization_graph power_port.get_power_draw.allocated|percentage:powerfeed.available_power %}</td>
|
<td>{% utilization_graph power_port.get_power_draw.allocated|percentage:powerfeed.available_power %}</td>
|
||||||
@ -223,13 +209,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<a href="{{ resv.get_absolute_url }}">{{ resv.unit_list }}</a>
|
<a href="{{ resv.get_absolute_url }}">{{ resv.unit_list }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>{{ resv.tenant|linkify|placeholder }}</td>
|
||||||
{% if resv.tenant %}
|
|
||||||
<a href="{{ resv.tenant.get_absolute_url }}">{{ resv.tenant }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
{{ resv.description }}<br />
|
{{ resv.description }}<br />
|
||||||
<small>{{ resv.user }} · {{ resv.created|annotated_date }}</small>
|
<small>{{ resv.user }} · {{ resv.created|annotated_date }}</small>
|
||||||
|
@ -24,26 +24,18 @@
|
|||||||
<th scope="row">Site</th>
|
<th scope="row">Site</th>
|
||||||
<td>
|
<td>
|
||||||
{% if rack.site.region %}
|
{% if rack.site.region %}
|
||||||
<a href="{{ rack.site.region.get_absolute_url }}">{{ rack.site.region }}</a> /
|
{{ rack.site.region|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ rack.site.get_absolute_url }}">{{ rack.site }}</a>
|
{{ rack.site|linkify }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Location</th>
|
<th scope="row">Location</th>
|
||||||
<td>
|
<td>{{ rack.location|linkify|placeholder }}</td>
|
||||||
{% if rack.location %}
|
|
||||||
<a href="{{ rack.location.get_absolute_url }}">{{ rack.location }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Rack</th>
|
<th scope="row">Rack</th>
|
||||||
<td>
|
<td>{{ rack|linkify }}</td>
|
||||||
<a href="{{ rack.get_absolute_url }}">{{ rack }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</table>
|
</table>
|
||||||
@ -64,9 +56,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -20,19 +20,11 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Device</th>
|
<th scope="row">Device</th>
|
||||||
<td>
|
<td>{{ object.device|linkify }}</td>
|
||||||
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Module</th>
|
<th scope="row">Module</th>
|
||||||
<td>
|
<td>{{ object.module|linkify|placeholder }}</td>
|
||||||
{% if object.module %}
|
|
||||||
<a href="{{ object.module.get_absolute_url }}">{{ object.module }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ None|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -82,7 +74,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Cable</th>
|
<th scope="row">Cable</th>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:rearport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
<a href="{% url 'dcim:rearport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -37,13 +37,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Sites</th>
|
<th scope="row">Sites</th>
|
||||||
|
@ -30,9 +30,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.region %}
|
{% if object.region %}
|
||||||
{% for region in object.region.get_ancestors %}
|
{% for region in object.region.get_ancestors %}
|
||||||
<a href="{{ region.get_absolute_url }}">{{ region }}</a> /
|
{{ region|linkify }} /
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a href="{{ object.region.get_absolute_url }}">{{ object.region }}</a>
|
{{ object.region|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -43,9 +43,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.group %}
|
{% if object.group %}
|
||||||
{% for group in object.group.get_ancestors %}
|
{% for group in object.group.get_ancestors %}
|
||||||
<a href="{{ group.get_absolute_url }}">{{ group }}</a> /
|
{{ group|linkify }} /
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
|
{{ object.group|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -60,9 +60,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -242,7 +242,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{% for i in location.level|as_range %}<i class="mdi mdi-circle-small"></i>{% endfor %}
|
{% for i in location.level|as_range %}<i class="mdi mdi-circle-small"></i>{% endfor %}
|
||||||
<a href="{{ location.get_absolute_url }}">{{ location }}</a>
|
{{ location|linkify }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'dcim:rack_list' %}?location_id={{ location.pk }}">{{ location.rack_count }}</a>
|
<a href="{% url 'dcim:rack_list' %}?location_id={{ location.pk }}">{{ location.rack_count }}</a>
|
||||||
@ -281,7 +281,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% for asn in asns %}
|
{% for asn in asns %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ asn.get_absolute_url }}">{{ asn }}</a></td>
|
<td>{{ asn|linkify }}</td>
|
||||||
<td>{{ asn.description|placeholder }}</td>
|
<td>{{ asn.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -37,13 +37,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Sites</th>
|
<th scope="row">Sites</th>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="node">
|
<div class="node">
|
||||||
<strong><a href="{{ circuit.get_absolute_url }}">{{ circuit }}</a></strong><br />
|
<strong>{{ circuit|linkify }}</strong><br />
|
||||||
Circuit<br />
|
Circuit<br />
|
||||||
<a href="{{ circuit.provider.get_absolute_url }}">{{ circuit.provider }}</a>
|
{{ circuit.provider|linkify }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<div class="node">
|
<div class="node">
|
||||||
<strong><a href="{{ device.get_absolute_url }}">{{ device }}</a></strong><br />
|
<strong>{{ device|linkify }}</strong><br />
|
||||||
{{ device.device_type.manufacturer }} {{ device.device_type }}<br />
|
{{ device.device_type.manufacturer }} {{ device.device_type }}<br />
|
||||||
<a href="{{ device.site.get_absolute_url }}">{{ device.site }}</a>
|
{{ device.site|linkify }}
|
||||||
{% if device.location %}
|
{% if device.location %}
|
||||||
/ <a href="{{ device.location.get_absolute_url }}">{{ device.location }}</a>
|
/ {{ device.location|linkify }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if device.rack %}
|
{% if device.rack %}
|
||||||
/ <a href="{{ device.rack.get_absolute_url }}">{{ device.rack }}</a>
|
/ {{ device.rack|linkify }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<div class="node">
|
<div class="node">
|
||||||
<strong><a href="{{ object.get_absolute_url }}">{{ object }}</a></strong>
|
<strong>{{ object|linkify }}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="node">
|
<div class="node">
|
||||||
<strong><a href="{{ powerpanel.get_absolute_url }}">{{ powerpanel }}</a></strong><br />
|
<strong>{{ powerpanel|linkify }}</strong><br />
|
||||||
Power Panel<br />
|
Power Panel<br />
|
||||||
<a href="{{ powerpanel.site.get_absolute_url }}">{{ powerpanel.site }}</a>
|
{{ powerpanel.site|linkify }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
<div class="termination{% if obj == termination %} active{% endif %}">
|
<div class="termination{% if obj == termination %} active{% endif %}">
|
||||||
<strong><a href="{{ termination.get_absolute_url }}">{{ termination }}</a></strong><br />
|
<strong>{{ termination|linkify }}</strong><br />
|
||||||
{{ termination|meta:"verbose_name"|bettertitle }}
|
{{ termination|meta:"verbose_name"|bettertitle }}
|
||||||
{% if termination.type %}
|
{% if termination.type %}
|
||||||
<small class="text-muted">{{ termination.get_type_display }}</small>
|
<small class="text-muted">{{ termination.get_type_display }}</small>
|
||||||
|
@ -27,13 +27,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Master</th>
|
<th scope="row">Master</th>
|
||||||
<td>
|
<td>{{ object.master|linkify }}</td>
|
||||||
{% if object.master %}
|
|
||||||
<a href="{{ object.master.get_absolute_url }}">{{ object.master }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -58,7 +52,7 @@
|
|||||||
{% for vc_member in members %}
|
{% for vc_member in members %}
|
||||||
<tr{% if vc_member == device %} class="info"{% endif %}>
|
<tr{% if vc_member == device %} class="info"{% endif %}>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a>
|
{{ vc_member|linkify }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% badge vc_member.vc_position show_empty=True %}
|
{% badge vc_member.vc_position show_empty=True %}
|
||||||
|
@ -51,9 +51,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% with device=form.instance virtual_chassis=vc_form.instance %}
|
{% with device=form.instance virtual_chassis=vc_form.instance %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>{{ device|linkify }}</td>
|
||||||
<a href="{{ device.get_absolute_url }}">{{ device }}</a>
|
|
||||||
</td>
|
|
||||||
<td>{{ device.pk }}</td>
|
<td>{{ device.pk }}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.rack %}
|
{% if device.rack %}
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<ul class="list-unstyled mb-0">
|
<ul class="list-unstyled mb-0">
|
||||||
{% for object in objects %}
|
{% for object in objects %}
|
||||||
<li><a href="{{ object.get_absolute_url }}">{{ object }}</a></li>
|
<li>{{ object|linkify }}</li>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<li class="text-muted">None</li>
|
<li class="text-muted">None</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<div class="form-control-plaintext">
|
<div class="form-control-plaintext">
|
||||||
<a href="{{ object.parent.get_absolute_url }}" class="">{{ object.parent }}</a>
|
{{ object.parent|linkify }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,21 +18,15 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Object</th>
|
<th scope="row">Object</th>
|
||||||
<td>
|
<td>{{ object.assigned_object|linkify }}</td>
|
||||||
<a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Created</th>
|
<th scope="row">Created</th>
|
||||||
<td>
|
<td>{{ object.created|annotated_date }}</td>
|
||||||
{{ object.created|annotated_date }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Created By</th>
|
<th scope="row">Created By</th>
|
||||||
<td>
|
<td>{{ object.created_by }}</td>
|
||||||
{{ object.created_by }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Kind</th>
|
<th scope="row">Kind</th>
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% for contact in contacts %}
|
{% for contact in contacts %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>{{ contact.contact|linkify }}</td>
|
||||||
<a href="{{ contact.contact.get_absolute_url }}">{{ contact.contact }}</a>
|
|
||||||
</td>
|
|
||||||
<td>{{ contact.role|placeholder }}</td>
|
<td>{{ contact.role|placeholder }}</td>
|
||||||
<td>{{ contact.get_priority_display|placeholder }}</td>
|
<td>{{ contact.get_priority_display|placeholder }}</td>
|
||||||
<td class="text-end noprint">
|
<td class="text-end noprint">
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
{% elif field.type == 'multiselect' and value %}
|
{% elif field.type == 'multiselect' and value %}
|
||||||
{{ value|join:", " }}
|
{{ value|join:", " }}
|
||||||
{% elif field.type == 'object' and value %}
|
{% elif field.type == 'object' and value %}
|
||||||
<a href="{{ value.get_absolute_url }}">{{ value }}</a>
|
{{ value|linkify }}
|
||||||
{% elif field.type == 'multiobject' and value %}
|
{% elif field.type == 'multiobject' and value %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for obj in value %}
|
{% for obj in value %}
|
||||||
<li><a href="{{ obj.get_absolute_url }}">{{ obj }}</a></li>
|
<li>{{ obj|linkify }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% elif value %}
|
{% elif value %}
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if prefix.object.group %}
|
{% if prefix.object.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
<td>Tenant</td>
|
<td>Tenant</td>
|
||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if prefix.object.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% for ipaddress in assignment.group.ip_addresses.all %}
|
{% for ipaddress in assignment.group.ip_addresses.all %}
|
||||||
<a href="{{ ipaddress.get_absolute_url }}">{{ ipaddress }}</a>
|
{{ ipaddress|linkify }}
|
||||||
{% if not forloop.last %}<br />{% endif %}
|
{% if not forloop.last %}<br />{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
|
@ -38,9 +38,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -73,9 +73,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.assigned_object %}
|
{% if object.assigned_object %}
|
||||||
{% if object.assigned_object.parent_object %}
|
{% if object.assigned_object.parent_object %}
|
||||||
<a href="{{ object.assigned_object.parent_object.get_absolute_url }}">{{ object.assigned_object.parent_object }}</a> /
|
{{ object.assigned_object.parent_object|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}
|
{{ object.assigned_object|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -85,9 +85,9 @@
|
|||||||
<th scope="row">NAT (inside)</th>
|
<th scope="row">NAT (inside)</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.nat_inside %}
|
{% if object.nat_inside %}
|
||||||
<a href="{{ object.nat_inside.get_absolute_url }}">{{ object.nat_inside }}</a>
|
{{ object.nat_inside|linkify }}
|
||||||
{% if object.nat_inside.assigned_object %}
|
{% if object.nat_inside.assigned_object %}
|
||||||
(<a href="{{ object.nat_inside.assigned_object.parent_object.get_absolute_url }}">{{ object.nat_inside.assigned_object.parent_object }}</a>)
|
({{ object.nat_inside.assigned_object.parent_object|linkify }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
@ -96,13 +96,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">NAT (outside)</th>
|
<th scope="row">NAT (outside)</th>
|
||||||
<td>
|
<td>{{ object.nat_outside|linkify|placeholder }}</td>
|
||||||
{% if object.nat_outside %}
|
|
||||||
<a href="{{ object.nat_outside.get_absolute_url }}">{{ object.nat_outside }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<th scope="row">VRF</th>
|
<th scope="row">VRF</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.vrf %}
|
{% if object.vrf %}
|
||||||
<a href="{{ object.vrf.get_absolute_url }}">{{ object.vrf }}</a> ({{ object.vrf.rd }})
|
{{ object.vrf|linkify }} ({{ object.vrf.rd }})
|
||||||
{% else %}
|
{% else %}
|
||||||
<span>Global</span>
|
<span>Global</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -45,13 +45,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Role</th>
|
<th scope="row">Role</th>
|
||||||
<td>
|
<td>{{ object.role|linkify|placeholder }}</td>
|
||||||
{% if object.role %}
|
|
||||||
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Status</th>
|
<th scope="row">Status</th>
|
||||||
@ -62,9 +56,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -29,9 +29,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -52,9 +52,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.site %}
|
{% if object.site %}
|
||||||
{% if object.site.region %}
|
{% if object.site.region %}
|
||||||
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
|
{{ object.site.region|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
|
{{ object.site|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -65,9 +65,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.vlan %}
|
{% if object.vlan %}
|
||||||
{% if object.vlan.group %}
|
{% if object.vlan.group %}
|
||||||
<a href="{{ object.vlan.group.get_absolute_url }}">{{ object.vlan.group }}</a> /
|
{{ object.vlan.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'ipam:vlan' pk=object.vlan.pk %}">{{ object.vlan }}</a>
|
{{ object.vlan|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -79,13 +79,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Role</th>
|
<th scope="row">Role</th>
|
||||||
<td>
|
<td>{{ object.role|linkify|placeholder }}</td>
|
||||||
{% if object.role %}
|
|
||||||
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Description</th>
|
<th scope="row">Description</th>
|
||||||
|
@ -15,13 +15,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Tenant</th>
|
<th scope="row">Tenant</th>
|
||||||
<td>
|
<td>{{ object.tenant|linkify|placeholder }}</td>
|
||||||
{% if object.tenant %}
|
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Description</th>
|
<th scope="row">Description</th>
|
||||||
|
@ -28,9 +28,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify }}</td>
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Protocol</th>
|
<th scope="row">Protocol</th>
|
||||||
@ -44,7 +42,7 @@
|
|||||||
<th scope="row">IP Addresses</th>
|
<th scope="row">IP Addresses</th>
|
||||||
<td>
|
<td>
|
||||||
{% for ipaddress in object.ipaddresses.all %}
|
{% for ipaddress in object.ipaddresses.all %}
|
||||||
<a href="{{ ipaddress.get_absolute_url }}">{{ ipaddress }}</a><br />
|
{{ ipaddress|linkify }}<br />
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.site %}
|
{% if object.site %}
|
||||||
{% if object.site.region %}
|
{% if object.site.region %}
|
||||||
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
|
{{ object.site.region|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
|
{{ object.site|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -27,13 +27,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Group</th>
|
<th scope="row">Group</th>
|
||||||
<td>
|
<td>{{ object.group|linkify|placeholder }}</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>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">VLAN ID</th>
|
<th scope="row">VLAN ID</th>
|
||||||
@ -48,9 +42,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% if object.scope %}
|
{% if object.scope %}
|
||||||
{# TODO: This should link to a filtered list of VLANGroups #}
|
{# TODO: This should link to a filtered list of VLANGroups #}
|
||||||
<li class="breadcrumb-item"><a href="{{ object.scope.get_absolute_url }}">{{ object.scope }}</a></li>
|
<li class="breadcrumb-item">{{ object.scope|linkify }}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@ -36,12 +36,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Scope</th>
|
<th scope="row">Scope</th>
|
||||||
<td>
|
<td>{{ object.scope|linkify|placeholder }}</td>
|
||||||
{% if object.scope %}
|
|
||||||
<a href="{{ object.scope.get_absolute_url }}">{{ object.scope }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Permitted VIDs</th>
|
<th scope="row">Permitted VIDs</th>
|
||||||
|
@ -20,13 +20,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Tenant</th>
|
<th scope="row">Tenant</th>
|
||||||
<td>
|
<td>{{ object.tenant|linkify|placeholder }}</td>
|
||||||
{% if object.tenant %}
|
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Unique IP Space</th>
|
<th scope="row">Unique IP Space</th>
|
||||||
|
@ -19,13 +19,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Group</td>
|
<td>Group</td>
|
||||||
<td>
|
<td>{{ object.group|linkify|placeholder }}</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
|
@ -29,13 +29,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Contacts</th>
|
<th scope="row">Contacts</th>
|
||||||
|
@ -20,13 +20,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Group</td>
|
<td>Group</td>
|
||||||
<td>
|
<td>{{ object.group|linkify|placeholder }}</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
|
@ -37,13 +37,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Tenants</th>
|
<th scope="row">Tenants</th>
|
||||||
|
@ -17,37 +17,19 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Type</th>
|
<th scope="row">Type</th>
|
||||||
<td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td>
|
<td>{{ object.type|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Group</th>
|
<th scope="row">Group</th>
|
||||||
<td>
|
<td>{{ object.group|linkify }}</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>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Tenant</th>
|
<th scope="row">Tenant</th>
|
||||||
<td>
|
<td>{{ object.tenant|linkify }}</td>
|
||||||
{% if object.tenant %}
|
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Site</th>
|
<th scope="row">Site</th>
|
||||||
<td>
|
<td>{{ object.site|linkify }}</td>
|
||||||
{% if object.site %}
|
|
||||||
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Virtual Machines</th>
|
<th scope="row">Virtual Machines</th>
|
||||||
|
@ -23,32 +23,20 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Role</th>
|
<th scope="row">Role</th>
|
||||||
<td>
|
<td>{{ object.role|linkify|placeholder }}</td>
|
||||||
{% if object.role %}
|
|
||||||
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Platform</th>
|
<th scope="row">Platform</th>
|
||||||
<td>
|
<td>{{ object.platform|linkify|placeholder }}</td>
|
||||||
{% if object.platform %}
|
|
||||||
<a href="{{ object.platform.get_absolute_url }}">{{ object.platform }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Tenant</th>
|
<th scope="row">Tenant</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.tenant %}
|
{% if object.tenant %}
|
||||||
{% if object.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
{{ object.tenant.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
{{ object.tenant|linkify }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -103,9 +91,9 @@
|
|||||||
<th scope="row">Cluster</th>
|
<th scope="row">Cluster</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.cluster.group %}
|
{% if object.cluster.group %}
|
||||||
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
|
{{ object.cluster.group|linkify }} /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
|
{{ object.cluster|linkify }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -21,9 +21,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Virtual Machine</th>
|
<th scope="row">Virtual Machine</th>
|
||||||
<td>
|
<td>{{ object.virtual_machine|linkify }}</td>
|
||||||
<a href="{{ object.virtual_machine.get_absolute_url }}">{{ object.virtual_machine }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Name</th>
|
<th scope="row">Name</th>
|
||||||
@ -41,33 +39,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Bridge</th>
|
<th scope="row">Bridge</th>
|
||||||
<td>
|
<td>{{ object.bridge|linkify|placeholder }}</td>
|
||||||
{% if object.bridge %}
|
|
||||||
<a href="{{ object.bridge.get_absolute_url }}">{{ object.bridge }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">VRF</th>
|
<th scope="row">VRF</th>
|
||||||
<td>
|
<td>{{ object.vrf|linkify|placeholder }}</td>
|
||||||
{% if object.vrf %}
|
|
||||||
<a href="{{ object.vrf.get_absolute_url }}">{{ object.vrf }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Description</th>
|
<th scope="row">Description</th>
|
||||||
|
@ -3,15 +3,11 @@
|
|||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>{{ interface.device|linkify }}</td>
|
||||||
<a href="{{ interface.device.get_absolute_url }}">{{ interface.device }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Interface</td>
|
<td>Interface</td>
|
||||||
<td>
|
<td>{{ interface|linkify }}</td>
|
||||||
<a href="{{ interface.get_absolute_url }}">{{ interface }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
|
@ -16,13 +16,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Group</td>
|
<td>Group</td>
|
||||||
<td>
|
<td>{{ object.group|linkify|placeholder }}</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>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Description</th>
|
<th scope="row">Description</th>
|
||||||
@ -30,13 +24,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">VLAN</th>
|
<th scope="row">VLAN</th>
|
||||||
<td>
|
<td>{{ object.vlan|linkify|placeholder }}</td>
|
||||||
{% if object.vlan %}
|
|
||||||
<a href="{{ object.vlan.get_absolute_url }}">{{ object.vlan }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,13 +35,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Parent</th>
|
<th scope="row">Parent</th>
|
||||||
<td>
|
<td>{{ object.parent|linkify|placeholder }}</td>
|
||||||
{% if object.parent %}
|
|
||||||
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Wireless LANs</th>
|
<th scope="row">Wireless LANs</th>
|
||||||
|
@ -20,6 +20,18 @@ register = template.Library()
|
|||||||
# General
|
# General
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@register.filter()
|
||||||
|
def linkify(instance):
|
||||||
|
"""
|
||||||
|
Render a hyperlink for object's with a `get_absolute_url()` method, using the object's string representation
|
||||||
|
as the link's text. If the object has no `get_absolute_url()` method, return an empty string.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
return mark_safe(f'<a href="{instance.get_absolute_url()}">{instance}</a>')
|
||||||
|
except (AttributeError, TypeError):
|
||||||
|
return ''
|
||||||
|
|
||||||
|
|
||||||
@register.filter()
|
@register.filter()
|
||||||
def bettertitle(value):
|
def bettertitle(value):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user