mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
limits ip addresses on interface tables #14645
This commit is contained in:
parent
ebf6ce1b01
commit
749fc31bc4
@ -36,13 +36,17 @@ DEVICEBAY_STATUS = """
|
|||||||
|
|
||||||
INTERFACE_IPADDRESSES = """
|
INTERFACE_IPADDRESSES = """
|
||||||
<div class="table-badge-group">
|
<div class="table-badge-group">
|
||||||
{% for ip in value.all %}
|
{% if value.count >= 3 %}
|
||||||
{% if ip.status != 'active' %}
|
<a href="{% url 'ipam:ipaddress_list' %}?interface_id={{ record.pk }}">{{ value.count }}</a>
|
||||||
<a href="{{ ip.get_absolute_url }}" class="table-badge badge bg-{{ ip.get_status_color }}" data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}">{{ ip }}</a>
|
{% else %}
|
||||||
{% else %}
|
{% for ip in value.all %}
|
||||||
<a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
|
{% if ip.status != 'active' %}
|
||||||
{% endif %}
|
<a href="{{ ip.get_absolute_url }}" class="table-badge badge bg-{{ ip.get_status_color }}" data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}">{{ ip }}</a>
|
||||||
{% endfor %}
|
{% else %}
|
||||||
|
<a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user