{% load helpers %} {% include 'inc/messages.html' %} {% if request.htmx %} {% include "netbox_librenms_plugin/inc/_sync_cache_countdown.html" with cache_expiry=ip_sync.cache_expiry cache_container_id="ip-cache-countdown" cache_countdown_id="ip-countdown-timer" cache_oob=True %} {% endif %} {% if ip_sync.table %} {# Migrated donors must not sync: hiding only the button leaves the POST form live (Enter in a filter still submits), so drop the form in migrated mode. #} {% with model_name=ip_sync.object|meta:"model_name" %} {% if migrated_to_marker %}
{% else %}
{% endif %} {% endwith %} {% csrf_token %} {% if ip_sync.server_key %}{% endif %}
{% if not migrated_to_marker %} {% endif %}
Filters apply to currently displayed IP addresses.
{% include 'netbox_librenms_plugin/inc/paginator.html' with table=ip_sync.table %} {% include 'inc/table.html' with table=ip_sync.table %} {% include 'netbox_librenms_plugin/inc/paginator.html' with table=ip_sync.table %}
{% if migrated_to_marker %}
{% else %} {% endif %} {% else %}

No IP address data loaded. Click Refresh IP Addresses to fetch data from LibreNMS.

{% endif %} {% comment %} Migrated donor: per-row "Move IP to winner" actions. Re-homes an interface-assigned IP to the winner's same-named interface (the backend validates and fails closed via an OOB toast). Mirrors the interface move-to-winner control in _interface_sync_content.html. {% endcomment %} {% if migrated_to_marker and ip_sync.movable_ips %}
Move IP addresses{% if migrated_to_winner %} to {{ migrated_to_winner.name }}{% endif %}
{% if not migrated_to_winner %} {% endif %}

Re-home a donor interface-assigned IP to the winner's same-named interface (move the interface first if it doesn't exist on the winner yet).

{% for ip in ip_sync.movable_ips %} {% endfor %}
IP Address Interface Migrate
{{ ip.address }} {{ ip.interface_name|default:"-" }} {% include "netbox_librenms_plugin/inc/_migrate_move_button.html" with move_url_name="plugins:netbox_librenms_plugin:ipaddress_move_to_winner" obj_id=ip.id obj_label=ip.address entity_word="IP" obj_interface_name=ip.interface_name winner=migrated_to_winner server_key=migrated_to_marker.server_key|default:ip_sync.server_key %}
{% endif %}