mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 07:56:44 -06:00
adds copy button to ip addresses in interface list #13697
This commit is contained in:
parent
22e474ff96
commit
27584dbea4
@ -35,15 +35,27 @@ DEVICEBAY_STATUS = """
|
||||
"""
|
||||
|
||||
INTERFACE_IPADDRESSES = """
|
||||
<div class="table-badge-group">
|
||||
<div class="table-badge-group container">
|
||||
<div class="row align-items-center">
|
||||
{% for ip in value.all %}
|
||||
{% if ip.status != 'active' %}
|
||||
<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>
|
||||
<div class="col-md-5 mb-2">
|
||||
<a href="{{ ip.get_absolute_url }}" class="table-badge badge bg-{{ ip.get_status_color }} copy-content" data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}">{{ ip }}</a>
|
||||
</div>
|
||||
<div class="col-md-5 mb-2">
|
||||
{% copy_content record.pk prefix="ipaddress_" %}
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
|
||||
<div class="col-md-5 mb-2">
|
||||
<a href="{{ ip.get_absolute_url }}" class="table-badge copy-content" id="ipaddress_{{ record.pk }}">{{ ip }}</a>
|
||||
</div>
|
||||
<div class="col-md-5 mb-2">
|
||||
{% copy_content record.pk prefix="ipaddress_" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
|
||||
INTERFACE_FHRPGROUPS = """
|
||||
|
Loading…
Reference in New Issue
Block a user