From 3f94295d7ec4863e2b46bf871b7c5f83512eee9e Mon Sep 17 00:00:00 2001 From: bellwood Date: Wed, 20 Jul 2016 13:22:20 -0400 Subject: [PATCH] support for #304 support for #304 --- netbox/dcim/tables.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/netbox/dcim/tables.py b/netbox/dcim/tables.py index dc66c3ab1..65a1cbbb3 100644 --- a/netbox/dcim/tables.py +++ b/netbox/dcim/tables.py @@ -48,6 +48,18 @@ STATUS_ICON = """ {% endif %} """ +UTILIZATION_GRAPH = """ +{% with record.get_utilization as percentage %} +
+ {% if percentage < 15 %}{{ percentage }}%{% endif %} +
+ {% if percentage >= 15 %}{{ percentage }}%{% endif %} +
+
+{% endwith %} +""" + # # Sites