diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index fe4703345..bf6c9c1f1 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -234,6 +234,13 @@ def utilization_graph(utilization, warning_threshold=75, danger_threshold=90): """ Display a horizontal bar graph indicating a percentage of utilization. """ + if isinstance(utilization, int): + return { + 'utilization': utilization, + 'warning_threshold': warning_threshold, + 'danger_threshold': danger_threshold, + } + return { 'utilization': utilization[0], 'warning_threshold': warning_threshold,