1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #2813: Add Filter and List View for TenantGroup

Added Filter for TenantGroup to the following Forms and Filter classes

* circuit.Circuit
* dcim.Site
* dcim.Rack
* dcim.RackElevation
* dcim.RackReservation
* dcim.Device
* ipam.IPAddress
* ipam.Prefix
* ipam.VRF
* ipam.VLAN
* virtualization.VirtualMachine

Added List View to the following classes:

* circuit.Circuit
* dcim.Site
* dcim.Rack
* dcim.RackReservation
* dcim.Device
* ipam.IPAddress
* ipam.Prefix
* ipam.VRF
* ipam.VLAN
* virtualization.VirtualMachine
This commit is contained in:
dansheps
2019-02-23 11:09:02 -06:00
parent f78c228c75
commit 8683efe54a
5 changed files with 30 additions and 13 deletions

View File

@@ -20,6 +20,16 @@ COL_TENANT = """
{% 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