{# SPDX-License-Identifier: Apache-2.0 #} {# Copyright (C) 2025 Marcin Zieba #} {# Lazy fragment: OSPF category — two grids (instances + interfaces) over ONE category #} {# payload. Each mount pulls its own section (nso-grid.js opts.extract), so an Accept in #} {# one section re-reads the shared JSON but only repaints its own rows and counts. #} {% include "netbox_nso_plugin/categories/_adapter_error.html" %} {% if grid_payload.instances.rows or grid_payload.interfaces.rows %}

Edit router IDs and interface OSPF knobs inline, or Accept the full row. Editing makes NetBox the source of truth; process IDs and VRFs remain relationship changes in the full NetBox routing UI.

{{ grid_payload|json_script:"nso-ospf-data" }} {% url 'plugins:netbox_nso_plugin:device_nso_category' pk=object.pk key='ospf' as cat_url %} {% if grid_payload.instances.rows %}
OSPF Instances
{% url 'plugins:netbox_nso_plugin:routing_bulk_accept_ospf_instances' device_pk=object.pk as bulk_url %}{% include "netbox_nso_plugin/categories/_bulk_accept.html" with bulk_url=bulk_url show=category_has_unowned label="Accept All Instances" %}
{% include "netbox_nso_plugin/categories/_grid.html" with cls="nso-ospf-inst" json_url=cat_url|add:"?format=json" counts=grid_payload.instances.counts %} {% endif %} {% if grid_payload.interfaces.rows %}
OSPF Interfaces
{% url 'plugins:netbox_nso_plugin:routing_bulk_accept_ospf_interfaces' device_pk=object.pk as bulk_url %}{% include "netbox_nso_plugin/categories/_bulk_accept.html" with bulk_url=bulk_url show=category_has_unowned label="Accept All Interfaces" %}
{% include "netbox_nso_plugin/categories/_grid.html" with cls="nso-ospf-if" json_url=cat_url|add:"?format=json" counts=grid_payload.interfaces.counts %} {% endif %} {% else %}

No OSPF configuration.

{% endif %}