{# SPDX-License-Identifier: Apache-2.0 #} {# Copyright (C) 2025 Marcin Zieba #} {# Lazy-loaded fragment: Logging category (remote syslog servers + local severity levels). #} {% include "netbox_nso_plugin/categories/_adapter_error.html" %} {% if logging_data.local_levels %} {% with ll=logging_data.local_levels %}

Local severity levels (console / monitor / module). Editing takes ownership. Un-accepting RETRACTS the managed levels — on NX the affected destination is disabled (no logging <dest>), not reverted to its previous level.

{% url 'plugins:netbox_nso_plugin:overlay_field_edit' key='logging_levels' pk=ll.pk as levels_edit_url %}
ConsoleMonitorModuleStatus / Synced
{{ ll.console_severity|default:"unmanaged" }} {{ ll.monitor_severity|default:"unmanaged" }} {{ ll.module_severity|default:"unmanaged" }} {% include "netbox_nso_plugin/categories/_state_badge.html" with status=ll.status %}
{% if ll.last_sync_at %}{{ ll.last_sync_at|date:"Y-m-d H:i" }}{% else %}not synced{% endif %}
{% url 'plugins:netbox_nso_plugin:logging_accept_levels' pk=ll.pk as accept_url %}{% include "netbox_nso_plugin/categories/_accept_cell.html" with accept_url=accept_url status=ll.status %} {% if ll.status == "accepted" or ll.status == "in_sync" or ll.status == "apply_failed" %} {% url 'plugins:netbox_nso_plugin:logging_unaccept_levels' pk=ll.pk as unaccept_url %}
{% csrf_token %}
{% endif %}
{% endwith %} {% endif %} {% if logging_data.hosts %}

Edit destination options, policy, and source context inline. The server address is the structural identity; changing it is a remove-and-create operation rather than a field edit.

{% include "netbox_nso_plugin/categories/_table_filter.html" with fid="flt-logging-hosts" placeholder="Filter by server / severity…" show_status=True %}
{% for h in logging_data.hosts %} {% url 'plugins:netbox_nso_plugin:overlay_field_edit' key='logging_host' pk=h.pk as host_edit_url %} {% endfor %}
DestinationPolicySource contextStatus / Synced
{{ h.address }} {{ h.severity|default:"device default" }} · {{ h.facility|default:"any facility" }} {{ h.source|default:"device default" }} · {{ h.vrf|default:"global" }} {% include "netbox_nso_plugin/categories/_state_badge.html" with status=h.status residue=h.residue_survivor residue_job=h.residue_job_id %}
{% if h.last_sync_at %}{{ h.last_sync_at|date:"Y-m-d H:i" }}{% else %}not synced{% endif %}
{% url 'plugins:netbox_nso_plugin:logging_accept_host' pk=h.pk as accept_url %}{% include "netbox_nso_plugin/categories/_accept_cell.html" with accept_url=accept_url status=h.status %}
{% else %}

No remote syslog servers configured.

{% endif %}