diff --git a/docs/plugins/development/templates.md b/docs/plugins/development/templates.md index 06876c04c..64616c442 100644 --- a/docs/plugins/development/templates.md +++ b/docs/plugins/development/templates.md @@ -230,6 +230,8 @@ The following custom template filters are available in NetBox. ::: utilities.templatetags.builtins.filters.content_type_id +::: utilities.templatetags.builtins.filters.linkify + ::: utilities.templatetags.builtins.filters.meta ::: utilities.templatetags.builtins.filters.placeholder diff --git a/netbox/templates/circuits/circuit.html b/netbox/templates/circuits/circuit.html index 94cad56b3..881b6cca6 100644 --- a/netbox/templates/circuits/circuit.html +++ b/netbox/templates/circuits/circuit.html @@ -18,9 +18,7 @@ - + @@ -28,7 +26,7 @@ - + @@ -37,14 +35,10 @@ diff --git a/netbox/templates/circuits/inc/circuit_termination.html b/netbox/templates/circuits/inc/circuit_termination.html index d0a739c33..fdb01e803 100644 --- a/netbox/templates/circuits/inc/circuit_termination.html +++ b/netbox/templates/circuits/inc/circuit_termination.html @@ -32,9 +32,9 @@ @@ -48,11 +48,11 @@ {% with peer=termination.get_link_peer %} to {% if peer.device %} - {{ peer.device }}
+ {{ peer.device|linkify }}
{% elif peer.circuit %} - {{ peer.circuit }}
+ {{ peer.circuit|linkify }}
{% endif %} - {{ peer }} + {{ peer|linkify }} {% endwith %}
@@ -82,9 +82,7 @@ {% else %}
- + {% endif %} diff --git a/netbox/templates/circuits/providernetwork.html b/netbox/templates/circuits/providernetwork.html index d1c513f98..4987722a5 100644 --- a/netbox/templates/circuits/providernetwork.html +++ b/netbox/templates/circuits/providernetwork.html @@ -20,9 +20,7 @@
Provider - {{ object.provider }} - {{ object.provider|linkify }}
Circuit ID
Type{{ object.type }}{{ object.type|linkify }}
Status
Tenant - {% if object.tenant %} - {% if object.tenant.group %} - {{ object.tenant.group }} / - {% endif %} - {{ object.tenant }} - {% else %} - None + {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / {% endif %} + {{ object.tenant|linkify|placeholder }}
Site {% if termination.site.region %} - {{ termination.site.region }} / + {{ termination.site.region|linkify }} / {% endif %} - {{ termination.site }} + {{ termination.site|linkify }}
Provider Network - {{ termination.provider_network }} - {{ termination.provider_network|linkify }}
- + diff --git a/netbox/templates/dcim/cable.html b/netbox/templates/dcim/cable.html index d68353274..f1cf986e6 100644 --- a/netbox/templates/dcim/cable.html +++ b/netbox/templates/dcim/cable.html @@ -24,14 +24,10 @@ diff --git a/netbox/templates/dcim/cable_trace.html b/netbox/templates/dcim/cable_trace.html index d9dbc5b2d..ac0481925 100644 --- a/netbox/templates/dcim/cable_trace.html +++ b/netbox/templates/dcim/cable_trace.html @@ -25,7 +25,7 @@ {% if next_node.cable %}
  • {{ next_node }} - (Cable {{ next_node.cable }}) + (Cable {{ next_node.cable|linkify }})
  • {% else %}
  • {{ next_node }}
  • diff --git a/netbox/templates/dcim/consoleport.html b/netbox/templates/dcim/consoleport.html index 08f409557..ce2c1655d 100644 --- a/netbox/templates/dcim/consoleport.html +++ b/netbox/templates/dcim/consoleport.html @@ -20,19 +20,11 @@
    Provider - {{ object.provider }} - {{ object.provider|linkify }}
    Name
    Tenant - {% if object.tenant %} - {% if object.tenant.group %} - {{ object.tenant.group }} / - {% endif %} - {{ object.tenant }} - {% else %} - None + {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / {% endif %} + {{ object.tenant|linkify|placeholder }}
    - + - + @@ -74,7 +66,7 @@ - + - + diff --git a/netbox/templates/dcim/consoleserverport.html b/netbox/templates/dcim/consoleserverport.html index 81d7734d3..52b1a3229 100644 --- a/netbox/templates/dcim/consoleserverport.html +++ b/netbox/templates/dcim/consoleserverport.html @@ -20,19 +20,11 @@
    Device - {{ object.device }} - {{ object.device|linkify }}
    Module - {% if object.module %} - {{ object.module }} - {% else %} - {{ None|placeholder }} - {% endif %} - {{ object.module|linkify|placeholder }}
    Name
    Cable - {{ object.cable }} + {{ object.cable|linkify }} @@ -83,15 +75,11 @@ {% if object.connected_endpoint %}
    Device - {{ object.connected_endpoint.device }} - {{ object.connected_endpoint.device|linkify }}
    Name - {{ object.connected_endpoint.name }} - {{ object.connected_endpoint|linkify:"name" }}
    Type
    - + - + @@ -74,7 +66,7 @@ - + diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index db3a7868e..d075a801d 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -19,28 +19,26 @@ - + @@ -127,7 +121,7 @@ {% for vc_member in vc_members %} - + @@ -187,9 +175,9 @@ {% if object.primary_ip4 %} {{ object.primary_ip4.address.ip }} {% if object.primary_ip4.nat_inside %} - (NAT for {{ object.primary_ip4.nat_inside.address.ip }}) + (NAT for {{ object.primary_ip4.nat_inside.address.ip|linkify }}) {% elif object.primary_ip4.nat_outside %} - (NAT: {{ object.primary_ip4.nat_outside.address.ip }}) + (NAT: {{ object.primary_ip4.nat_outside.address.ip|linkify }}) {% endif %} {% else %} @@ -202,9 +190,9 @@ {% if object.primary_ip6 %} {{ object.primary_ip6.address.ip }} {% if object.primary_ip6.nat_inside %} - (NAT for {{ object.primary_ip6.nat_inside.address.ip }}) + (NAT for {{ object.primary_ip6.nat_inside.address.ip|linkify }}) {% elif object.primary_ip6.nat_outside %} - (NAT: {{ object.primary_ip6.nat_outside.address.ip }}) + (NAT: {{ object.primary_ip6.nat_outside.address.ip|linkify }}) {% endif %} {% else %} @@ -216,9 +204,9 @@ {% endif %} diff --git a/netbox/templates/dcim/devicebay.html b/netbox/templates/dcim/devicebay.html index 3a470bec5..38cc8f16b 100644 --- a/netbox/templates/dcim/devicebay.html +++ b/netbox/templates/dcim/devicebay.html @@ -20,9 +20,7 @@
    Device - {{ object.device }} - {{ object.device|linkify }}
    Module - {% if object.module %} - {{ object.module }} - {% else %} - {{ None|placeholder }} - {% endif %} - {{ object.module|linkify|placeholder }}
    Name
    Cable - {{ object.cable }} + {{ object.cable|linkify }} @@ -84,14 +76,12 @@
    Device - {{ object.connected_endpoint.device }} + {{ object.connected_endpoint.device|linkify }}
    Name - {{ object.connected_endpoint.name }} - {{ object.connected_endpoint|linkify:"name" }}
    Type {% if object.site.region %} {% for region in object.site.region.get_ancestors %} - {{ region }} / + {{ region|linkify }} / {% endfor %} - {{ object.site.region }} + {{ object.site.region|linkify }} {% else %} - None + None {% endif %}
    Site - {{ object.site }} - {{ object.site|linkify }}
    Location {% if object.location %} {% for location in object.location.get_ancestors %} - {{ location }} / + {{ location|linkify }} / {% endfor %} - {{ object.location }} + {{ object.location|linkify }} {% else %} None {% endif %} @@ -61,7 +59,7 @@ {% if object.parent_bay %} {% with object.parent_bay.device as parent %} - {{ parent }} / {{ object.parent_bay }} + {{ parent|linkify }} / {{ object.parent_bay }} {% if parent.position %} (U{{ parent.position }} / {{ parent.get_face_display }}) {% endif %} @@ -78,20 +76,16 @@
    Tenant - {% if object.tenant %} - {% if object.tenant.group %} - {{ object.tenant.group }} / - {% endif %} - {{ object.tenant }} - {% else %} - None + {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / {% endif %} + {{ object.tenant|linkify|placeholder }}
    Device Type - {{ object.device_type }} ({{ object.device_type.u_height }}U) + {{ object.device_type|linkify }} ({{ object.device_type.u_height }}U)
    - {{ vc_member }} + {{ vc_member|linkify }} {% badge vc_member.vc_position show_empty=True %} @@ -173,13 +167,7 @@
    Platform - {% if object.platform %} - {{ object.platform }} - {% else %} - None - {% endif %} - {{ object.platform|linkify|placeholder }}
    Primary IPv4Cluster {% if object.cluster.group %} - {{ object.cluster.group }} / + {{ object.cluster.group|linkify }} / {% endif %} - {{ object.cluster }} + {{ object.cluster|linkify }}
    - + @@ -54,9 +52,7 @@
    Device - {{ object.device }} - {{ object.device|linkify }}
    Name
    - + diff --git a/netbox/templates/dcim/devicetype.html b/netbox/templates/dcim/devicetype.html index 4b9dc8db7..e717a48aa 100644 --- a/netbox/templates/dcim/devicetype.html +++ b/netbox/templates/dcim/devicetype.html @@ -14,7 +14,7 @@
    Device - {{ device }} - {{ device|linkify }}
    Device Type
    - + diff --git a/netbox/templates/dcim/frontport.html b/netbox/templates/dcim/frontport.html index a8d2dd06f..891f217ee 100644 --- a/netbox/templates/dcim/frontport.html +++ b/netbox/templates/dcim/frontport.html @@ -20,19 +20,11 @@
    Manufacturer{{ object.manufacturer }}{{ object.manufacturer|linkify }}
    Model Name
    - + - + @@ -54,9 +46,7 @@ - + @@ -88,7 +78,7 @@ - + - {% if termination.device.site %} - + - {% endif %} {% if termination.device.rack %} - - - - + + + + {% endif %} - + - + {% else %} {# Circuit termination #} - + - + {% endif %}
    Device - {{ object.device }} - {{ object.device|linkify }}
    Module - {% if object.module %} - {{ object.module }} - {% else %} - {{ None|placeholder }} - {% endif %} - {{ object.module|linkify|placeholder }}
    Name
    Rear Port - {{ object.rear_port }} - {{ object.rear_port|linkify }}
    Rear Port Position
    Cable - {{ object.cable }} + {{ object.cable|linkify }} diff --git a/netbox/templates/dcim/inc/cable_termination.html b/netbox/templates/dcim/inc/cable_termination.html index c9f3f0d4a..f44c3b9d1 100644 --- a/netbox/templates/dcim/inc/cable_termination.html +++ b/netbox/templates/dcim/inc/cable_termination.html @@ -4,51 +4,35 @@ {# Device component #}
    Device - {{ termination.device }} - {{ termination.device|linkify }}
    Site - {{ termination.device.site }} - {{ termination.device.site|linkify }}
    Rack - {{ termination.device.rack }} -
    Rack{{ termination.device.rack|linkify }}
    Type - {{ termination|meta:"verbose_name"|capfirst }} - {{ termination|meta:"verbose_name"|capfirst }}
    Component - {{ termination }} - {{ termination|linkify }}
    Provider - {{ termination.circuit.provider }} - {{ termination.circuit.provider|linkify }}
    Circuit - {{ termination.circuit }} ({{ termination }}) - {{ termination.|linkify }} ({{ termination }})
    diff --git a/netbox/templates/dcim/inc/cabletermination.html b/netbox/templates/dcim/inc/cabletermination.html index 26a7e1cd3..c7fa7918a 100644 --- a/netbox/templates/dcim/inc/cabletermination.html +++ b/netbox/templates/dcim/inc/cabletermination.html @@ -6,9 +6,9 @@ {{ termination.parent_object }} {% else %} - {{ termination.parent_object }} + {{ termination.parent_object|linkify }} {% endif %} - {{ termination }} + {{ termination|linkify }} diff --git a/netbox/templates/dcim/inc/endpoint_connection.html b/netbox/templates/dcim/inc/endpoint_connection.html index d5b9f6112..c0167ff0f 100644 --- a/netbox/templates/dcim/inc/endpoint_connection.html +++ b/netbox/templates/dcim/inc/endpoint_connection.html @@ -1,7 +1,7 @@ {% if path.destination_id %} {% with endpoint=path.destination %} - {{ endpoint.parent_object }} - {{ endpoint }} + {{ endpoint.parent_object|linkify }} + {{ endpoint|linkify }} {% endwith %} {% else %} Not connected diff --git a/netbox/templates/dcim/inc/interface_vlans_table.html b/netbox/templates/dcim/inc/interface_vlans_table.html index 67ffb2954..0c23b5702 100644 --- a/netbox/templates/dcim/inc/interface_vlans_table.html +++ b/netbox/templates/dcim/inc/interface_vlans_table.html @@ -8,9 +8,7 @@ {% with tagged_vlans=obj.tagged_vlans.all %} {% if obj.untagged_vlan and obj.untagged_vlan not in tagged_vlans %} - - {{ obj.untagged_vlan.vid }} - + {{ obj.untagged_vlan|linkify:"vid" }} {{ obj.untagged_vlan.name }} @@ -22,9 +20,7 @@ {% endif %} {% for vlan in tagged_vlans %} - - {{ vlan.vid }} - + {{ vlan|linkify:"vid" }} {{ vlan.name }} diff --git a/netbox/templates/dcim/inc/nonracked_devices.html b/netbox/templates/dcim/inc/nonracked_devices.html index f1b669eb9..7f4da2f24 100644 --- a/netbox/templates/dcim/inc/nonracked_devices.html +++ b/netbox/templates/dcim/inc/nonracked_devices.html @@ -21,7 +21,7 @@ {{ device.device_role }} {{ device.device_type }} {% if device.parent_bay %} - {{ device.parent_bay.device }} + {{ device.parent_bay.device|linkify }} {{ device.parent_bay }} {% else %} — diff --git a/netbox/templates/dcim/inc/panels/inventory_items.html b/netbox/templates/dcim/inc/panels/inventory_items.html index c65b342b2..d89b64814 100644 --- a/netbox/templates/dcim/inc/panels/inventory_items.html +++ b/netbox/templates/dcim/inc/panels/inventory_items.html @@ -15,19 +15,9 @@ {% for item in object.inventory_items.all %} - - {{ item.name }} - - - {{ item.label|placeholder }} - - - {% if item.role %} - {{ item.role }} - {% else %} - - {% endif %} - + {{ item|linkify:"name" }} + {{ item.label|placeholder }} + {{ item.role|linkify|placeholder }} {% if perms.dcim.change_inventoryitem %} diff --git a/netbox/templates/dcim/interface.html b/netbox/templates/dcim/interface.html index 35121b2e3..366509242 100644 --- a/netbox/templates/dcim/interface.html +++ b/netbox/templates/dcim/interface.html @@ -30,19 +30,11 @@ - + - + @@ -74,33 +66,15 @@ - + - + - + @@ -128,13 +102,7 @@ - +
    Device - {{ object.device }} - {{ object.device|linkify }}
    Module - {% if object.module %} - {{ object.module }} - {% else %} - {{ None|placeholder }} - {% endif %} - {{ object.module|linkify|placeholder }}
    Name
    Parent - {% if object.parent %} - {{ object.parent }} - {% else %} - None - {% endif %} - {{ object.parent|linkify|placeholder }}
    Bridge - {% if object.bridge %} - {{ object.bridge }} - {% else %} - None - {% endif %} - {{ object.bridge|linkify|placeholder }}
    LAG - {% if object.lag%} - {{ object.lag }} - {% else %} - None - {% endif %} - {{ object.lag|linkify|placeholder }}
    Description
    VRF - {% if object.vrf %} - {{ object.vrf }} - {% else %} - None - {% endif %} - {{ object.vrf|linkify|placeholder }}
    @@ -170,7 +138,7 @@ Cable -
    {{ object.cable }} + {{ object.cable|linkify }} @@ -180,15 +148,11 @@ {% with iface=object.connected_endpoint %} Device - - {{ iface.device }} - + {{ iface.device|linkify }} Name - - {{ iface.name }} - + {{ iface|linkify:"name" }} Type @@ -196,13 +160,7 @@ LAG - - {% if iface.lag%} - {{ iface.lag }} - {% else %} - None - {% endif %} - + {{ iface.lag|linkify|placeholder }} Description @@ -225,11 +183,11 @@ {% with ct=object.connected_endpoint %} Provider - {{ ct.circuit.provider }} + {{ ct.circuit.provider|linkify }} Circuit - {{ ct.circuit }} + {{ ct.circuit|linkify }} Side @@ -253,7 +211,7 @@ Wireless Link - {{ object.wireless_link }} + {{ object.wireless_link|linkify }} @@ -262,15 +220,11 @@ {% with peer_interface=object.connected_endpoint %} Device - - {{ peer_interface.device }} - + {{ peer_interface.device|linkify }} Name - - {{ peer_interface }} - + {{ peer_interface|linkify }} Type @@ -409,14 +363,12 @@ {% if wlan.group %} - {{ wlan.group }} + {{ wlan.group|linkify }} {% else %} — {% endif %} - - {{ wlan.ssid }} - + {{ wlan|linkify:"ssid" }} {% empty %} @@ -443,15 +395,9 @@ {% for member in object.member_interfaces.all %} - - {{ member.device }} - - - {{ member }} - - - {{ member.get_type_display }} - + {{ member.device|linkify }} + {{ member|linkify }} + {{ member.get_type_display }} {% empty %} diff --git a/netbox/templates/dcim/inventoryitem.html b/netbox/templates/dcim/inventoryitem.html index 0e30c5c8c..b52a7457b 100644 --- a/netbox/templates/dcim/inventoryitem.html +++ b/netbox/templates/dcim/inventoryitem.html @@ -18,19 +18,11 @@ - + - + @@ -42,33 +34,15 @@ - + - + - + diff --git a/netbox/templates/dcim/location.html b/netbox/templates/dcim/location.html index 43bbfd114..b2b2bc4cd 100644 --- a/netbox/templates/dcim/location.html +++ b/netbox/templates/dcim/location.html @@ -6,7 +6,7 @@ {% block breadcrumbs %} {{ block.super }} {% for location in object.get_ancestors %} - + {% endfor %} {% endblock %} @@ -37,30 +37,20 @@ - + - + - - + + diff --git a/netbox/templates/dcim/module.html b/netbox/templates/dcim/module.html index 4a6b7d097..632e37c2c 100644 --- a/netbox/templates/dcim/module.html +++ b/netbox/templates/dcim/module.html @@ -19,21 +19,15 @@
    Device - {{ object.device }} - {{ object.device|linkify }}
    Parent Item - {% if object.parent %} - {{ object.parent }} - {% else %} - - {% endif %} - {{ object.parent|linkify|placeholder }}
    Name
    Role - {% if object.role %} - {{ object.role }} - {% else %} - - {% endif %} - {{ object.role|linkify|placeholder }}
    Component - {% if object.component %} - {{ object.component }} - {% else %} - - {% endif %} - {{ object.component|linkify|placeholder }}
    Manufacturer - {% if object.manufacturer %} - {{ object.manufacturer }} - {% else %} - - {% endif %} - {{ object.manufacturer|linkify|placeholder }}
    Part ID
    Site{{ object.site }}{{ object.site|linkify }}
    Parent - {% if object.parent %} - {{ object.parent }} - {% else %} - - {% endif %} - {{ object.parent|linkify|placeholder }}
    Tenant - {% if object.tenant %} - {% if object.tenant.group %} - {{ object.tenant.group }} / - {% endif %} - {{ object.tenant }} - {% else %} - None - {% endif %} - Tenant + {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / + {% endif %} + {{ object.tenant|linkify|placeholder }} +
    Racks
    - + - + - + diff --git a/netbox/templates/dcim/modulebay.html b/netbox/templates/dcim/modulebay.html index f4d56e5f2..a12e020e9 100644 --- a/netbox/templates/dcim/modulebay.html +++ b/netbox/templates/dcim/modulebay.html @@ -54,15 +54,11 @@
    Device - {{ object.device }} - {{ object.device|linkify }}
    Device Type - {{ object.device.device_type }} - {{ object.device.device_type|linkify }}
    Module Type - {{ object.module_type }} - {{ object.module_type|linkify }}
    Serial Number
    - + - +
    Manufacturer - {{ module.module_type.manufacturer }} - {{ module.module_type.manufacturer|linkify }}
    Module Type - {{ module.module_type }} - {{ module.module_type|linkify }}
    {% endwith %} diff --git a/netbox/templates/dcim/moduletype.html b/netbox/templates/dcim/moduletype.html index 5d9aef940..59d1139be 100644 --- a/netbox/templates/dcim/moduletype.html +++ b/netbox/templates/dcim/moduletype.html @@ -12,7 +12,7 @@ - + diff --git a/netbox/templates/dcim/platform.html b/netbox/templates/dcim/platform.html index 5180d47c5..8d1e3797a 100644 --- a/netbox/templates/dcim/platform.html +++ b/netbox/templates/dcim/platform.html @@ -37,13 +37,7 @@ - + diff --git a/netbox/templates/dcim/powerfeed.html b/netbox/templates/dcim/powerfeed.html index 5157a5ec0..777af5563 100644 --- a/netbox/templates/dcim/powerfeed.html +++ b/netbox/templates/dcim/powerfeed.html @@ -24,19 +24,11 @@
    Manufacturer{{ object.manufacturer }}{{ object.manufacturer|linkify }}
    Model Name
    Manufacturer - {% if object.manufacturer %} - {{ object.manufacturer }} - {% else %} - None - {% endif %} - {{ object.manufacturer|linkify|placeholder }}
    NAPALM Driver
    - + - + @@ -50,7 +42,7 @@ - + - + diff --git a/netbox/templates/dcim/poweroutlet.html b/netbox/templates/dcim/poweroutlet.html index 1410c3c54..6408bc759 100644 --- a/netbox/templates/dcim/poweroutlet.html +++ b/netbox/templates/dcim/poweroutlet.html @@ -20,19 +20,11 @@
    Power Panel - {{ object.power_panel }} - {{ object.power_panel|linkify }}
    Rack - {% if object.rack %} - {{ object.rack }} - {% else %} - None - {% endif %} - {{ object.rack|linkify|placeholder }}
    TypeConnected Device {% if object.connected_endpoint %} - {{ object.connected_endpoint.device }} ({{ object.connected_endpoint }}) + {{ object.connected_endpoint.device|linkify }} ({{ object.connected_endpoint }}) {% else %} None {% endif %} @@ -122,7 +114,7 @@
    Cable - {{ object.cable }} + {{ object.cable|linkify }} @@ -131,15 +123,11 @@ {% if object.connected_endpoint %}
    Device - {{ object.connected_endpoint.device }} - {{ object.connected_endpoint.device|linkify }}
    Name - {{ object.connected_endpoint.name }} - {{ object.connected_endpoint|linkify:"name" }}
    Type
    - + - + @@ -80,7 +72,7 @@ - + - + diff --git a/netbox/templates/dcim/powerpanel.html b/netbox/templates/dcim/powerpanel.html index 02db0e56f..b7fe8eb39 100644 --- a/netbox/templates/dcim/powerpanel.html +++ b/netbox/templates/dcim/powerpanel.html @@ -7,7 +7,7 @@ {{ block.super }} {% if object.location %} - + {% endif %} {% endblock %} @@ -22,19 +22,11 @@
    Device - {{ object.device }} - {{ object.device|linkify }}
    Module - {% if object.module %} - {{ object.module }} - {% else %} - {{ None|placeholder }} - {% endif %} - {{ object.module|linkify|placeholder }}
    Name
    Cable - {{ object.cable }} + {{ object.cable|linkify }} @@ -89,15 +81,11 @@ {% if object.connected_endpoint %}
    Device - {{ object.connected_endpoint.device }} - {{ object.connected_endpoint.device|linkify }}
    Name - {{ object.connected_endpoint.name }} - {{ object.connected_endpoint|linkify:"name" }}
    Type
    - + - +
    Site - {{ object.site }} - {{ object.site|linkify }}
    Location - {% if object.location %} - {{ object.location }} - {% else %} - None - {% endif %} - {{ object.location|linkify|placeholder }}
    diff --git a/netbox/templates/dcim/powerport.html b/netbox/templates/dcim/powerport.html index f82eb1444..6dc06f528 100644 --- a/netbox/templates/dcim/powerport.html +++ b/netbox/templates/dcim/powerport.html @@ -20,19 +20,11 @@ - + - + @@ -80,7 +72,7 @@ - + - + diff --git a/netbox/templates/dcim/rack.html b/netbox/templates/dcim/rack.html index aa8d3a94f..6574e9b74 100644 --- a/netbox/templates/dcim/rack.html +++ b/netbox/templates/dcim/rack.html @@ -39,9 +39,9 @@ @@ -49,9 +49,9 @@ @@ -80,13 +76,7 @@ - + @@ -179,18 +169,10 @@ {% for powerfeed in power_feeds %} - - - + + + + {% with power_port=powerfeed.connected_endpoint %} {% if power_port %} @@ -220,16 +202,8 @@ {% for resv in reservations %} - - + + - + - + {% endwith %}
    Device - {{ object.device }} - {{ object.device|linkify }}
    Module - {% if object.module %} - {{ object.module }} - {% else %} - {{ None|placeholder }} - {% endif %} - {{ object.module|linkify|placeholder }}
    Name
    Cable - {{ object.cable }} + {{ object.cable|linkify }} @@ -89,15 +81,11 @@ {% if object.connected_endpoint %}
    Device - {{ object.connected_endpoint.device }} - {{ object.connected_endpoint.device|linkify }}
    Name - {{ object.connected_endpoint.name }} - {{ object.connected_endpoint|linkify:"name" }}
    TypeSite {% if object.site.region %} - {{ object.site.region }} / + {{ object.site.region|linkify }} / {% endif %} - {{ object.site }} + {{ object.site|linkify }}
    {% if object.location %} {% for location in object.location.get_ancestors %} - {{ location }} / + {{ location|linkify }} / {% endfor %} - {{ object.location }} + {{ object.location|linkify }} {% else %} None {% endif %} @@ -64,14 +64,10 @@
    Tenant - {% if object.tenant %} - {% if object.tenant.group %} - {{ object.tenant.group }} / - {% endif %} - {{ object.tenant }} - {% else %} - None + {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / {% endif %} + {{ object.tenant|linkify|placeholder }}
    Role - {% if object.role %} - {{ object.role }} - {% else %} - None - {% endif %} - {{ object.role|linkify|placeholder }}
    Serial Number
    - {{ powerfeed.power_panel.name }} - - - {{ powerfeed.name }} - - {% badge powerfeed.get_status_display bg_color=powerfeed.get_status_color %} - - {% badge powerfeed.get_type_display bg_color=powerfeed.get_type_color %} - {{ powerfeed.power_panel|linkify }}{{ powerfeed|linkify }}{% badge powerfeed.get_status_display bg_color=powerfeed.get_status_color %}{% badge powerfeed.get_type_display bg_color=powerfeed.get_type_color %}{% utilization_graph power_port.get_power_draw.allocated|percentage:powerfeed.available_power %}
    - {{ resv.unit_list }} - - {% if resv.tenant %} - {{ resv.tenant }} - {% else %} - None - {% endif %} - {{ resv|linkify:"unit_list" }}{{ resv.tenant|linkify|placeholder }} {{ resv.description }}
    {{ resv.user }} · {{ resv.created|annotated_date }} diff --git a/netbox/templates/dcim/rackreservation.html b/netbox/templates/dcim/rackreservation.html index 1e16af675..ebdd1d845 100644 --- a/netbox/templates/dcim/rackreservation.html +++ b/netbox/templates/dcim/rackreservation.html @@ -24,26 +24,18 @@
    Site {% if rack.site.region %} - {{ rack.site.region }} / + {{ rack.site.region|linkify }} / {% endif %} - {{ rack.site }} + {{ rack.site|linkify }}
    Location - {% if rack.location %} - {{ rack.location }} - {% else %} - None - {% endif %} - {{ rack.location|linkify|placeholder }}
    Rack - {{ rack }} - {{ rack|linkify }}
    @@ -62,14 +54,10 @@ Tenant - {% if object.tenant %} - {% if object.tenant.group %} - {{ object.tenant.group }} / - {% endif %} - {{ object.tenant }} - {% else %} - None + {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / {% endif %} + {{ object.tenant|linkify|placeholder }} diff --git a/netbox/templates/dcim/rearport.html b/netbox/templates/dcim/rearport.html index 3be2510d5..3cdccbd7c 100644 --- a/netbox/templates/dcim/rearport.html +++ b/netbox/templates/dcim/rearport.html @@ -20,19 +20,11 @@ - + - + @@ -82,7 +74,7 @@ - + diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index 41255b4a0..fe0a558eb 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -30,9 +30,9 @@ @@ -242,7 +238,7 @@ {% for asn in asns %} - + {% endfor %} diff --git a/netbox/templates/dcim/sitegroup.html b/netbox/templates/dcim/sitegroup.html index 49f91b812..396271147 100644 --- a/netbox/templates/dcim/sitegroup.html +++ b/netbox/templates/dcim/sitegroup.html @@ -37,13 +37,7 @@ - + diff --git a/netbox/templates/dcim/trace/circuit.html b/netbox/templates/dcim/trace/circuit.html index 70e191dd2..330099235 100644 --- a/netbox/templates/dcim/trace/circuit.html +++ b/netbox/templates/dcim/trace/circuit.html @@ -1,5 +1,5 @@
    - {{ circuit }}
    + {{ circuit|linkify }}
    Circuit
    - {{ circuit.provider }} + {{ circuit.provider|linkify }}
    diff --git a/netbox/templates/dcim/trace/device.html b/netbox/templates/dcim/trace/device.html index b1d37b76c..30d1d7149 100644 --- a/netbox/templates/dcim/trace/device.html +++ b/netbox/templates/dcim/trace/device.html @@ -1,11 +1,11 @@
    - {{ device }}
    + {{ device|linkify }}
    {{ device.device_type.manufacturer }} {{ device.device_type }}
    - {{ device.site }} + {{ device.site|linkify }} {% if device.location %} - / {{ device.location }} + / {{ device.location|linkify }} {% endif %} {% if device.rack %} - / {{ device.rack }} + / {{ device.rack|linkify }} {% endif %}
    diff --git a/netbox/templates/dcim/trace/object.html b/netbox/templates/dcim/trace/object.html index 72e5b5787..fe9fe002b 100644 --- a/netbox/templates/dcim/trace/object.html +++ b/netbox/templates/dcim/trace/object.html @@ -1,3 +1,3 @@
    - {{ object }} + {{ object|linkify }}
    diff --git a/netbox/templates/dcim/trace/powerpanel.html b/netbox/templates/dcim/trace/powerpanel.html index f5b6230a7..d89b408fb 100644 --- a/netbox/templates/dcim/trace/powerpanel.html +++ b/netbox/templates/dcim/trace/powerpanel.html @@ -1,5 +1,5 @@
    - {{ powerpanel }}
    + {{ powerpanel|linkify }}
    Power Panel
    - {{ powerpanel.site }} + {{ powerpanel.site|linkify }}
    diff --git a/netbox/templates/dcim/trace/termination.html b/netbox/templates/dcim/trace/termination.html index f2dbca87f..3a2dbded2 100644 --- a/netbox/templates/dcim/trace/termination.html +++ b/netbox/templates/dcim/trace/termination.html @@ -1,6 +1,6 @@ {% load helpers %}
    - {{ termination }}
    + {{ termination|linkify }}
    {{ termination|meta:"verbose_name"|bettertitle }} {% if termination.type %} {{ termination.get_type_display }} diff --git a/netbox/templates/dcim/virtualchassis.html b/netbox/templates/dcim/virtualchassis.html index 2e1344f71..4683b775b 100644 --- a/netbox/templates/dcim/virtualchassis.html +++ b/netbox/templates/dcim/virtualchassis.html @@ -27,13 +27,7 @@
    - +
    Device - {{ object.device }} - {{ object.device|linkify }}
    Module - {% if object.module %} - {{ object.module }} - {% else %} - {{ None|placeholder }} - {% endif %} - {{ object.module|linkify|placeholder }}
    Name
    Cable - {{ object.cable }} + {{ object.cable|linkify }} diff --git a/netbox/templates/dcim/region.html b/netbox/templates/dcim/region.html index 10ecb9ea6..8a548dd4a 100644 --- a/netbox/templates/dcim/region.html +++ b/netbox/templates/dcim/region.html @@ -37,13 +37,7 @@
    Parent - {% if object.parent %} - {{ object.parent }} - {% else %} - - {% endif %} - {{ object.parent|linkify|placeholder }}
    Sites {% if object.region %} {% for region in object.region.get_ancestors %} - {{ region }} / + {{ region|linkify }} / {% endfor %} - {{ object.region }} + {{ object.region|linkify }} {% else %} None {% endif %} @@ -43,9 +43,9 @@ {% if object.group %} {% for group in object.group.get_ancestors %} - {{ group }} / + {{ group|linkify }} / {% endfor %} - {{ object.group }} + {{ object.group|linkify }} {% else %} None {% endif %} @@ -58,14 +58,10 @@
    Tenant - {% if object.tenant %} - {% if object.tenant.group %} - {{ object.tenant.group }} / - {% endif %} - {{ object.tenant }} - {% else %} - None + {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / {% endif %} + {{ object.tenant|linkify|placeholder }}
    {% for i in location.level|as_range %}{% endfor %} - {{ location }} + {{ location|linkify }} {{ location.rack_count }} @@ -281,7 +277,7 @@
    {{ asn }}{{ asn|linkify }} {{ asn.description|placeholder }}
    Parent - {% if object.parent %} - {{ object.parent }} - {% else %} - - {% endif %} - {{ object.parent|linkify|placeholder }}
    Sites
    Master - {% if object.master %} - {{ object.master }} - {% else %} - - {% endif %} - {{ object.master|linkify }}
    @@ -58,7 +52,7 @@ {% for vc_member in members %} - {{ vc_member }} + {{ vc_member|linkify }} {% badge vc_member.vc_position show_empty=True %} diff --git a/netbox/templates/dcim/virtualchassis_edit.html b/netbox/templates/dcim/virtualchassis_edit.html index a37ff102a..327f20531 100644 --- a/netbox/templates/dcim/virtualchassis_edit.html +++ b/netbox/templates/dcim/virtualchassis_edit.html @@ -51,9 +51,7 @@ {% endfor %} {% with device=form.instance virtual_chassis=vc_form.instance %} - - {{ device }} - + {{ device|linkify }} {{ device.pk }} {% if device.rack %} diff --git a/netbox/templates/extras/configcontext.html b/netbox/templates/extras/configcontext.html index 3a9cc2e0c..56ec52c07 100644 --- a/netbox/templates/extras/configcontext.html +++ b/netbox/templates/extras/configcontext.html @@ -56,7 +56,7 @@