From c181e691e5a685819d9e4f1c7cec8db728a62e3a Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 10 Apr 2019 13:05:51 -0400 Subject: [PATCH] Include draw numbers of connected power ports --- netbox/templates/dcim/device.html | 2 +- netbox/templates/dcim/inc/poweroutlet.html | 23 +++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index a2eddc15f..5e01ef413 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -629,7 +629,7 @@ Name Description Cable - Connection + Connection diff --git a/netbox/templates/dcim/inc/poweroutlet.html b/netbox/templates/dcim/inc/poweroutlet.html index 042c9142a..f3a420c2e 100644 --- a/netbox/templates/dcim/inc/poweroutlet.html +++ b/netbox/templates/dcim/inc/poweroutlet.html @@ -30,14 +30,23 @@ {# Connection #} {% if po.connected_endpoint %} - - {{ po.connected_endpoint.device }} - - - {{ po.connected_endpoint }} - + {% with pp=po.connected_endpoint %} + + {{ pp.device }} + + + {{ pp }} + + + {% if pp.allocated_draw %} + {{ pp.allocated_draw }}W{% if pp.maximum_draw %} ({{ pp.maximum_draw }}W max){% endif %} + {% elif pp.maximum_draw %} + {{ pp.maximum_draw }}W + {% endif %} + + {% endwith %} {% else %} - + Not connected {% endif %}