diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 1ef8a406d..f8b8e95c2 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -11,7 +11,115 @@ {% block content %}
| {% trans "Region" %} | +{% nested_tree object.site.region %} | +
|---|---|
| {% trans "Site" %} | +{{ object.site|linkify }} | +
| {% trans "Location" %} | +{% nested_tree object.location %} | +
| {% trans "Virtual Chassis" %} | +{{ object.virtual_chassis|linkify }} | +
| {% trans "Rack" %} | ++ {% if object.rack %} + {{ object.rack|linkify }} + + + + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
| {% trans "Position" %} | ++ {% if object.parent_bay %} + {% with object.parent_bay.device as parent %} + {{ parent|linkify }} / {{ object.parent_bay }} + {% if parent.position %} + (U{{ parent.position|floatformat }} / {{ parent.get_face_display }}) + {% endif %} + {% endwith %} + {% elif object.rack and object.position %} + U{{ object.position|floatformat }} / {{ object.get_face_display }} + {% elif object.rack and object.device_type.u_height %} + {% trans "Not racked" %} + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
| {% trans "GPS Coordinates" %} | ++ {% if object.latitude and object.longitude %} + {% if config.MAPS_URL %} + + {% endif %} + {{ object.latitude }}, {{ object.longitude }} + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
| {% trans "Tenant" %} | ++ {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / + {% endif %} + {{ object.tenant|linkify|placeholder }} + | +
| {% trans "Device Type" %} | ++ {{ object.device_type|linkify:"full_name" }} ({{ object.device_type.u_height|floatformat }}U) + | +
| {% trans "Description" %} | +{{ object.description|placeholder }} | +
| {% trans "Airflow" %} | ++ {{ object.get_airflow_display|placeholder }} + | +
| {% trans "Serial Number" %} | +{{ object.serial|placeholder }} | +
| {% trans "Asset Tag" %} | +{{ object.asset_tag|placeholder }} | +
| {% trans "Config Template" %} | +{{ object.config_template|linkify|placeholder }} | +
| {% trans "Status" %} | +{% badge object.get_status_display bg_color=object.get_status_color %} | +
|---|---|
| {% trans "Role" %} | +{{ object.role|linkify }} | +
| {% trans "Platform" %} | +{{ object.platform|linkify|placeholder }} | +
| {% trans "Primary IPv4" %} | ++ {% if object.primary_ip4 %} + {{ object.primary_ip4.address.ip }} + {% if object.primary_ip4.nat_inside %} + ({% trans "NAT for" %} {{ object.primary_ip4.nat_inside.address.ip }}) + {% elif object.primary_ip4.nat_outside.exists %} + ({% trans "NAT" %}: {% for nat in object.primary_ip4.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %}) + {% endif %} + {% copy_content "primary_ip4" %} + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
| {% trans "Primary IPv6" %} | ++ {% if object.primary_ip6 %} + {{ object.primary_ip6.address.ip }} + {% if object.primary_ip6.nat_inside %} + ({% trans "NAT for" %} {{ object.primary_ip6.nat_inside.address.ip }}) + {% elif object.primary_ip6.nat_outside.exists %} + ({% trans "NAT" %}: {% for nat in object.primary_ip6.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %}) + {% endif %} + {% copy_content "primary_ip6" %} + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
| Out-of-band IP | ++ {% if object.oob_ip %} + {{ object.oob_ip.address.ip }} + {% if object.oob_ip.nat_inside %} + ({% trans "NAT for" %} {{ object.oob_ip.nat_inside.address.ip }}) + {% elif object.oob_ip.nat_outside.exists %} + ({% trans "NAT" %}: {% for nat in object.oob_ip.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %}) + {% endif %} + {% copy_content "oob_ip" %} + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
| {% trans "Cluster" %} | ++ {% if object.cluster.group %} + {{ object.cluster.group|linkify }} / + {% endif %} + {{ object.cluster|linkify }} + | +
| {% trans "Name" %} | +{{ object.name }} | +
|---|---|
| {% trans "Description" %} | +{{ object.description|placeholder }} | +
| {% trans "Site" %} | +{{ object.site|linkify }} | +
| {% trans "Parent" %} | +{{ object.parent|linkify|placeholder }} | +
| {% trans "Status" %} | +{% badge object.get_status_display bg_color=object.get_status_color %} | +
| {% trans "Tenant" %} | ++ {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / + {% endif %} + {{ object.tenant|linkify|placeholder }} + | +
| {% trans "Facility" %} | +{{ object.facility|placeholder }} | +
| {% trans "Region" %} | +{% nested_tree object.site.region %} | +
|---|---|
| {% trans "Site" %} | +{{ object.site|linkify }} | +
| {% trans "Location" %} | +{% nested_tree object.location %} | +
| {% trans "Facility ID" %} | +{{ object.facility_id|placeholder }} | +
| {% trans "Tenant" %} | ++ {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / + {% endif %} + {{ object.tenant|linkify|placeholder }} + | +
| {% trans "Status" %} | +{% badge object.get_status_display bg_color=object.get_status_color %} | +
| {% trans "Rack Type" %} | +{{ object.rack_type|linkify:"full_name"|placeholder }} | +
| {% trans "Role" %} | +{{ object.role|linkify|placeholder }} | +
| {% trans "Description" %} | +{{ object.description|placeholder }} | +
| {% trans "Serial Number" %} | +{{ object.serial|placeholder }} | +
| {% trans "Asset Tag" %} | +{{ object.asset_tag|placeholder }} | +
| {% trans "Airflow" %} | +{{ object.get_airflow_display|placeholder }} | +
| {% trans "Space Utilization" %} | +{% utilization_graph object.get_utilization %} | +
| {% trans "Power Utilization" %} | +{% utilization_graph object.get_power_utilization %} | +
| {% trans "Name" %} | +{{ object.name }} | +
|---|---|
| {% trans "Description" %} | +{{ object.description|placeholder }} | +
| {% trans "Parent" %} | +{{ object.parent|linkify|placeholder }} | +
| {% trans "Region" %} | ++ {% nested_tree object.region %} + | +
|---|---|
| {% trans "Group" %} | ++ {% nested_tree object.group %} + | +
| {% trans "Status" %} | +{% badge object.get_status_display bg_color=object.get_status_color %} | +
| {% trans "Tenant" %} | ++ {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / + {% endif %} + {{ object.tenant|linkify|placeholder }} + | +
| {% trans "Facility" %} | +{{ object.facility|placeholder }} | +
| {% trans "Description" %} | +{{ object.description|placeholder }} | +
| {% trans "Time Zone" %} | +
+ {% if object.time_zone %}
+ {{ object.time_zone }} ({% trans "UTC" %} {{ object.time_zone|tzoffset }}) + {% trans "Site time" %}: {% timezone object.time_zone %}{% now 'Y-m-d H:i' %}{% endtimezone %} + {% else %} + {{ ''|placeholder }} + {% endif %} + |
+
| {% trans "Physical Address" %} | ++ {% if object.physical_address %} + {{ object.physical_address|linebreaksbr }} + {% if config.MAPS_URL %} + + {% trans "Map" %} + + {% endif %} + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
| {% trans "Shipping Address" %} | +{{ object.shipping_address|linebreaksbr|placeholder }} | +
| {% trans "GPS Coordinates" %} | ++ {% if object.latitude and object.longitude %} + {% if config.MAPS_URL %} + + {% endif %} + {{ object.latitude }}, {{ object.longitude }} + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
| {% trans "Name" %} | +{{ object.name }} | +
|---|---|
| {% trans "Description" %} | +{{ object.description|placeholder }} | +
| {% trans "Parent" %} | +{{ object.parent|linkify|placeholder }} | +