{# SPDX-FileCopyrightText: 2026 Marcin Zieba #} {# SPDX-License-Identifier: Apache-2.0 #} {# The Lease Synchronization State of a Lease row (views/leases.py _lease_badge); the state badge is the NetBox link. #} {% with state=record.sync_state %} {% if state.code == "synchronized" %} Synced {% elif state.code == "not-synchronized" %} Not Synchronized {% elif state.code == "unmarked" %} Unmarked {% elif state.code == "unknown" %} Unknown {% elif not state and record.netbox_url %} NetBox {% endif %} {% if record.sync_url %} {% elif record.sync_refusal %} {% include "netbox_kea/inc/sync_refused.html" with reason=record.sync_refusal label="Sync" icon="mdi-sync" button_class="badge text-bg-secondary border-0 opacity-50" %} {% endif %} {% endwith %}