mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 04:58:16 -06:00
update tenant column
This commit is contained in:
parent
018833bf6e
commit
aa18281360
@ -220,7 +220,9 @@ class DeviceAssignTable(BaseTable):
|
||||
verbose_name='Name'
|
||||
)
|
||||
status = ChoiceFieldColumn()
|
||||
tenant = TenantColumn()
|
||||
tenant = tables.TemplateColumn(
|
||||
template_code=DEVICE_ASSIGN_TENANT
|
||||
)
|
||||
site = tables.Column()
|
||||
location = tables.Column()
|
||||
rack = tables.Column()
|
||||
|
@ -102,6 +102,16 @@ DEVICE_ASSIGN_LINK = """
|
||||
<a href="{% url 'dcim:device_edit' pk=record.pk %}?rack={{ request.GET.rack }}&position={{ request.GET.position }}&site={{ request.GET.site }}&location={{ object.GET.location }}&face={{ request.GET.face }}&return_url={{ request.GET.return_url }}">{{ record }}</a>
|
||||
"""
|
||||
|
||||
DEVICE_ASSIGN_TENANT = """
|
||||
{% if record.tenant %}
|
||||
{{ record.tenant }}
|
||||
{% elif record.vrf.tenant %}
|
||||
{{ record.vrf.tenant }}
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
"""
|
||||
|
||||
#
|
||||
# Device component buttons
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user