From 6c27e6c4fe34b8983519b5d85a84742f6b8555fc Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 13 Oct 2017 10:45:34 -0400 Subject: [PATCH] Fixes #1584: Colorized virtual machine role column --- netbox/virtualization/tables.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/netbox/virtualization/tables.py b/netbox/virtualization/tables.py index f7b7ffbe9..a8f9068ac 100644 --- a/netbox/virtualization/tables.py +++ b/netbox/virtualization/tables.py @@ -24,6 +24,10 @@ VIRTUALMACHINE_STATUS = """ {{ record.get_status_display }} """ +VIRTUALMACHINE_ROLE = """ + +""" + VIRTUALMACHINE_PRIMARY_IP = """ {{ record.primary_ip6.address.ip|default:"" }} {% if record.primary_ip6 and record.primary_ip4 %}
{% endif %} @@ -93,6 +97,7 @@ class VirtualMachineTable(BaseTable): name = tables.LinkColumn() status = tables.TemplateColumn(template_code=VIRTUALMACHINE_STATUS) cluster = tables.LinkColumn('virtualization:cluster', args=[Accessor('cluster.pk')]) + role = tables.TemplateColumn(VIRTUALMACHINE_ROLE) tenant = tables.LinkColumn('tenancy:tenant', args=[Accessor('tenant.slug')]) class Meta(BaseTable.Meta):