diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index ff1b2ff27..834151758 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -6,375 +6,376 @@ {% load plugins %} {% block content %} -
-
-
-
-
-
-
-
- Device -
-
- - - - - - - - - - - + + + + + + + + + + + + + +
Region - {% if object.site.region %} - {% for region in object.site.region.get_ancestors %} - {{ region }} / - {% endfor %} - {{ object.site.region }} - {% else %} - None - {% endif %} -
Site - {{ object.site }} -
Location - {% if object.location %} - {% for location in object.location.get_ancestors %} - {{ location }} / +
+
+
+
+
+
+
+
+ Device +
+
+ + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - -
Region + {% if object.site.region %} + {% for region in object.site.region.get_ancestors %} + {{ region }} / {% endfor %} - {{ object.location }} + {{ object.site.region }} + {% else %} + None + {% endif %} +
Site + {{ object.site }} +
Location + {% if object.location %} + {% for location in object.location.get_ancestors %} + {{ location }} / + {% endfor %} + {{ object.location }} + {% else %} + None + {% endif %} +
Rack + {% if object.rack %} + {{ object.rack }} {% else %} None {% endif %} -
Rack - {% if object.rack %} - {{ object.rack }} - {% else %} - None - {% endif %} -
Position - {% if object.parent_bay %} - {% with object.parent_bay.device as parent %} - {{ parent }} / {{ object.parent_bay }} - {% if parent.position %} - (U{{ parent.position }} / {{ parent.get_face_display }}) - {% endif %} - {% endwith %} - {% elif object.rack and object.position %} - U{{ object.position }} / {{ object.get_face_display }} - {% elif object.rack and object.device_type.u_height %} - Not racked - {% else %} - - {% endif %} -
Tenant - {% if object.tenant %} - {% if object.tenant.group %} - {{ object.tenant.group }} / +
Position + {% if object.parent_bay %} + {% with object.parent_bay.device as parent %} + {{ parent }} / {{ object.parent_bay }} + {% if parent.position %} + (U{{ parent.position }} / {{ parent.get_face_display }}) {% endif %} - {{ object.tenant }} - {% else %} - None + {% endwith %} + {% elif object.rack and object.position %} + U{{ object.position }} / {{ object.get_face_display }} + {% elif object.rack and object.device_type.u_height %} + Not racked + {% else %} + + {% endif %} +
Tenant + {% if object.tenant %} + {% if object.tenant.group %} + {{ object.tenant.group }} / {% endif %} -
Device Type - {{ object.device_type.display_name }} ({{ object.device_type.u_height }}U) -
Serial Number{{ object.serial|placeholder }}
Asset Tag{{ object.asset_tag|placeholder }}
-
+ {{ object.tenant }} + {% else %} + None + {% endif %} +
Device Type + {{ object.device_type.display_name }} ({{ object.device_type.u_height }}U) +
Serial Number{{ object.serial|placeholder }}
Asset Tag{{ object.asset_tag|placeholder }}
- {% if vc_members %} -
-
- Virtual Chassis -
-
- - - - - - - - {% for vc_member in vc_members %} - - - - - - - {% endfor %} -
DevicePositionMasterPriority
- {{ vc_member }} - {{ vc_member.vc_position }}{% if object.virtual_chassis.master == vc_member %}{% endif %}{{ vc_member.vc_priority|default:"" }}
-
- -
- {% endif %} +
+ {% if vc_members %}
- Management + Virtual Chassis
- - - - - - - - - - - - - - - - - - - - {% if object.cluster %} - - - - - {% endif %} -
- {{ object.get_status_display }} -
Role - {{ object.device_role }} -
Platform - {% if object.platform %} - {{ object.platform }} - {% else %} - None - {% endif %} -
Primary IPv4 - {% if object.primary_ip4 %} - {{ object.primary_ip4.address.ip }} - {% if object.primary_ip4.nat_inside %} - (NAT for {{ object.primary_ip4.nat_inside.address.ip }}) - {% elif object.primary_ip4.nat_outside %} - (NAT: {{ object.primary_ip4.nat_outside.address.ip }}) - {% endif %} - {% else %} - - {% endif %} -
Primary IPv6 - {% if object.primary_ip6 %} - {{ object.primary_ip6.address.ip }} - {% if object.primary_ip6.nat_inside %} - (NAT for {{ object.primary_ip6.nat_inside.address.ip }}) - {% elif object.primary_ip6.nat_outside %} - (NAT: {{ object.primary_ip6.nat_outside.address.ip }}) - {% endif %} - {% else %} - - {% endif %} -
Cluster - {% if object.cluster.group %} - {{ object.cluster.group }} / - {% endif %} - {{ object.cluster }} -
-
-
- {% include 'inc/custom_fields_panel.html' %} - {% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:device_list' %} -
-
- Comments -
-
- {% if object.comments %} - {{ object.comments|render_markdown }} - {% else %} - None - {% endif %} -
-
- {% plugin_left_page object %} -
-
- {% if object.powerports.exists and object.poweroutlets.exists %} -
-
- Power Utilization -
-
- - - - - - - - - {% for powerport in object.powerports.all %} - {% with utilization=powerport.get_power_draw powerfeed=powerport.connected_endpoint %} - - - - - {% if powerfeed.available_power %} - - - {% else %} - - - {% endif %} - - {% for leg in utilization.legs %} - - - - - - {% with phase_available=powerfeed.available_power|divide:3 %} - - {% endwith %} - - {% endfor %} - {% endwith %} - {% endfor %} -
InputOutletsAllocatedAvailableUtilization
{{ powerport }}{{ utilization.outlet_count }}{{ utilization.allocated }}VA{{ powerfeed.available_power }}VA{% utilization_graph utilization.allocated|percentage:powerfeed.available_power %}
Leg {{ leg.name }}{{ leg.outlet_count }}{{ leg.allocated }}{{ powerfeed.available_power|divide:3 }}VA{% utilization_graph leg.allocated|percentage:phase_available %}
-
-
- {% endif %} - {% if perms.secrets.view_secret %} -
-
- Secrets -
-
- {% include 'secrets/inc/assigned_secrets.html' %} -
- {% if perms.secrets.add_secret %} - - {% endif %} -
- {% endif %} -
-
- Services -
-
- {% if services %} - - {% for service in services %} - {% include 'ipam/inc/service.html' %} - {% endfor %} -
- {% else %} -
- None -
- {% endif %} -
- {% if perms.ipam.add_service %} - - {% endif %} -
-
-
- Images -
-
- {% include 'inc/image_attachments.html' with images=object.images.all %} -
- {% if perms.extras.add_imageattachment %} - - {% endif %} -
-
-
- Related Devices -
-
- {% if related_devices %} - - - - - {% for rd in related_devices %} - - - - + + + + {% for vc_member in vc_members %} + + + + + + {% endfor %}
DeviceRackType
- {{ rd }} - - {% if rd.rack %} - {{ rd.rack }} - {% else %} - - {% endif %} - {{ rd.device_type.display_name }}PositionMasterPriority
+ {{ vc_member }} + {{ vc_member.vc_position }}{% if object.virtual_chassis.master == vc_member %}{% endif %}{{ vc_member.vc_priority|default:"" }}
- {% else %} -
None
- {% endif %} +
+
- {% plugin_right_page object %} + {% endif %} +
+
+ Management +
+
+ + + + + + + + + + + + + + + + + + + + + + {% if object.cluster %} + + + + + {% endif %} +
Status + {{ object.get_status_display }} +
Role + {{ object.device_role }} +
Platform + {% if object.platform %} + {{ object.platform }} + {% else %} + None + {% endif %} +
Primary IPv4 + {% if object.primary_ip4 %} + {{ object.primary_ip4.address.ip }} + {% if object.primary_ip4.nat_inside %} + (NAT for {{ object.primary_ip4.nat_inside.address.ip }}) + {% elif object.primary_ip4.nat_outside %} + (NAT: {{ object.primary_ip4.nat_outside.address.ip }}) + {% endif %} + {% else %} + + {% endif %} +
Primary IPv6 + {% if object.primary_ip6 %} + {{ object.primary_ip6.address.ip }} + {% if object.primary_ip6.nat_inside %} + (NAT for {{ object.primary_ip6.nat_inside.address.ip }}) + {% elif object.primary_ip6.nat_outside %} + (NAT: {{ object.primary_ip6.nat_outside.address.ip }}) + {% endif %} + {% else %} + + {% endif %} +
Cluster + {% if object.cluster.group %} + {{ object.cluster.group }} / + {% endif %} + {{ object.cluster }} +
+
+ {% include 'inc/custom_fields_panel.html' %} + {% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:device_list' %} +
+
+ Comments +
+
+ {% if object.comments %} + {{ object.comments|render_markdown }} + {% else %} + None + {% endif %} +
+
+ {% plugin_left_page object %}
-
-
- {% plugin_full_width_page object %} +
+ {% if object.powerports.exists and object.poweroutlets.exists %} +
+
+ Power Utilization +
+
+ + + + + + + + + {% for powerport in object.powerports.all %} + {% with utilization=powerport.get_power_draw powerfeed=powerport.connected_endpoint %} + + + + + {% if powerfeed.available_power %} + + + {% else %} + + + {% endif %} + + {% for leg in utilization.legs %} + + + + + + {% with phase_available=powerfeed.available_power|divide:3 %} + + {% endwith %} + + {% endfor %} + {% endwith %} + {% endfor %} +
InputOutletsAllocatedAvailableUtilization
{{ powerport }}{{ utilization.outlet_count }}{{ utilization.allocated }}VA{{ powerfeed.available_power }}VA{% utilization_graph utilization.allocated|percentage:powerfeed.available_power %}
Leg {{ leg.name }}{{ leg.outlet_count }}{{ leg.allocated }}{{ powerfeed.available_power|divide:3 }}VA{% utilization_graph leg.allocated|percentage:phase_available %}
+
+
+ {% endif %} + {% if perms.secrets.view_secret %} +
+
+ Secrets +
+
+ {% include 'secrets/inc/assigned_secrets.html' %} +
+ {% if perms.secrets.add_secret %} + + {% endif %}
+ {% endif %} +
+
+ Services +
+
+ {% if services %} + + {% for service in services %} + {% include 'ipam/inc/service.html' %} + {% endfor %} +
+ {% else %} +
+ None +
+ {% endif %} +
+ {% if perms.ipam.add_service %} + + {% endif %} +
+
+
+ Images +
+
+ {% include 'inc/image_attachments.html' with images=object.images.all %} +
+ {% if perms.extras.add_imageattachment %} + + {% endif %} +
+
+
+ Related Devices +
+
+ {% if related_devices %} + + + + + + + {% for rd in related_devices %} + + + + + + {% endfor %} +
DeviceRackType
+ {{ rd }} + + {% if rd.rack %} + {{ rd.rack }} + {% else %} + + {% endif %} + {{ rd.device_type.display_name }}
+ {% else %} +
None
+ {% endif %} +
+
+ {% plugin_right_page object %} +
+
+
+
+ {% plugin_full_width_page object %}
- {% include 'secrets/inc/private_key_modal.html' %} +
+{% include 'secrets/inc/private_key_modal.html' %} {% endblock %}