Просмотр исходного кода

Remove tenant group from ipam table

dansheps 6 лет назад
Родитель
Сommit
22e5834d8b
2 измененных файлов с 1 добавлено и 15 удалено
  1. 1 5
      netbox/ipam/tables.py
  2. 0 10
      netbox/tenancy/tables.py

+ 1 - 5
netbox/ipam/tables.py

@@ -169,12 +169,8 @@ VLAN_MEMBER_ACTIONS = """
 """
 """
 
 
 TENANT_LINK = """
 TENANT_LINK = """
-{% if record.tenant and record.tenant.group %}
-    <a href="{% url 'tenancy:tenant_list' %}?group={{record.tenant.group.slug}}" title="{{ record.tenant.group.name}}">{{record.tenant.group}}</a>:<a href="{% url 'tenancy:tenant' slug=record.tenant.slug %}" title="{{ record.tenant.description }}">{{ record.tenant }}</a>
-{% elif record.tenant %}
+{% if record.tenant %}
     <a href="{% url 'tenancy:tenant' slug=record.tenant.slug %}" title="{{ record.tenant.description }}">{{ record.tenant }}</a>
     <a href="{% url 'tenancy:tenant' slug=record.tenant.slug %}" title="{{ record.tenant.description }}">{{ record.tenant }}</a>
-{% elif record.vrf.tenant.group %}
-    <a href="{% url 'tenancy:tenant_list' %}?group={{record.vrf.tenant.group.slug}}" title="{{ record.vrf.tenant.group.name}}">{{record.vrf.tenant.group}}</a>:<a href="{% url 'tenancy:tenant' slug=record.vrf.tenant.slug %}" title="{{ record.vrf.tenant.description }}">{{ record.vrf.tenant }}</a>*
 {% elif record.vrf.tenant %}
 {% elif record.vrf.tenant %}
     <a href="{% url 'tenancy:tenant' slug=record.vrf.tenant.slug %}" title="{{ record.vrf.tenant.description }}">{{ record.vrf.tenant }}</a>*
     <a href="{% url 'tenancy:tenant' slug=record.vrf.tenant.slug %}" title="{{ record.vrf.tenant.description }}">{{ record.vrf.tenant }}</a>*
 {% else %}
 {% else %}

+ 0 - 10
netbox/tenancy/tables.py

@@ -20,16 +20,6 @@ COL_TENANT = """
 {% endif %}
 {% endif %}
 """
 """
 
 
-COL_TENANTGROUP_TENANT = """
-{% if record.tenant and record.tenant.group %}
-    <a href="{% url 'tenancy:tenant_list' %}?group={{record.tenant.group.slug}}" title="{{ record.tenant.group.name}}">{{record.tenant.group}}</a>:<a href="{% url 'tenancy:tenant' slug=record.tenant.slug %}" title="{{ record.tenant.description }}">{{ record.tenant }}</a>
-{% elif record.tenant %}
-    <a href="{% url 'tenancy:tenant' slug=record.tenant.slug %}" title="{{ record.tenant.description }}">{{ record.tenant }}</a>
-{% else %}
-    &mdash;
-{% endif %}
-"""
-
 
 
 #
 #
 # Tenant groups
 # Tenant groups