{# HTMX template for device validation details modal #} {# Redesigned to match the sync page's clean table layout #}
| Status | {% if libre_device.status == 1 or libre_device.status == "1" %} Up {% elif libre_device.status == 0 or libre_device.status == "0" %} Down {% else %} Unknown {% endif %} |
|---|---|
| Hostname | {{ libre_device.hostname }} |
| ID | {{ libre_device.device_id }} |
| IP | {{ libre_device.ip|default:"—" }} |
| Location | {{ libre_device.location|default:"—" }} |
| Field | NetBox Value | LibreNMS Value |
|---|---|---|
| Name | {% if validation.existing_device %} {{ validation.existing_device.name }} {% if validation.name_sync_available %} {% endif %} {% else %} New device {% endif %} | {{ validation.resolved_name|default:libre_device.sysName|default:libre_device.hostname }} |
| Site | {% if validation.existing_device and validation.existing_device.site %} {{ validation.existing_device.site }} {% if validation.site.site and validation.existing_device.site.pk == validation.site.site.pk %} {% endif %} {% elif validation.site.site %} {{ validation.site.site.name }} {% else %} No matching site {% endif %} | {{ libre_device.location|default:"—" }} |
| Device Type |
{% if validation.device_type_mismatch %}
{{ validation.existing_device.device_type }}
{% elif validation.existing_device and validation.existing_device.device_type %}
{{ validation.existing_device.device_type }}
{% if sync_info and not sync_info.device_type_synced and sync_info.librenms_device_type %}
{% elif validation.device_type.device_type %}
{% endif %}
{% elif validation.device_type.device_type %}
{{ validation.device_type.device_type }}
{% else %}
{% if libre_device.hardware and libre_device.hardware != "-" %}
No matching type
{% else %}
No matching type
{% endif %}
{% endif %}
|
{{ libre_device.hardware|default:"—" }} |
| Serial | {% if validation.existing_device %} {% if validation.existing_device.serial %} {{ validation.existing_device.serial }} {% else %} Not set {% endif %} {% if sync_info and not sync_info.serial_synced %} {% if validation.serial_action == 'conflict' %} {% else %} {% endif %} {% elif sync_info and sync_info.serial_synced and sync_info.librenms_serial != '-' %} {% endif %} {% else %} — {% endif %} | {{ libre_device.serial|default:"—" }} {% if validation.serial_duplicate %} Conflict {% endif %} |
| {% if validation.import_as_vm %}Role{% else %}Device Role{% endif %} | {% if validation.existing_device and validation.existing_device.role %} {{ validation.existing_device.role }} {% elif validation.device_role.role %} {{ validation.device_role.role.name }} {% else %} No role assigned {% endif %} | — |
| Platform | {% if validation.existing_device and validation.existing_device.platform %} {{ validation.existing_device.platform }} {% if sync_info and not sync_info.platform_synced %} {% if sync_info.platform_info.platform_exists %} {% else %} {% endif %} {% elif sync_info and sync_info.platform_synced %} {% endif %} {% elif validation.platform.platform %} {{ validation.platform.platform.name }} {% elif sync_info and sync_info.platform_info.platform_exists %} Not set {% if validation.existing_device %} {% endif %} {% else %} Optional {% endif %} | {{ libre_device.os|default:"—" }} |
| Cluster | {% if validation.cluster.cluster %} {{ validation.cluster.cluster.name }} {% else %} No cluster assigned {% endif %} | — |
| Rack | {% if validation.rack.rack %} {% if validation.rack.rack.location %} {{ validation.rack.rack.location.name }} — {{ validation.rack.rack.name }} {% else %} {{ validation.rack.rack.name }} {% endif %} {% else %} Optional {% endif %} | — |
| Primary IP | {% if validation.existing_device and validation.existing_device.primary_ip %} {{ validation.existing_device.primary_ip }} {% elif libre_device.ip %} {{ libre_device.ip }} {% else %} No primary IP {% endif %} | {{ libre_device.ip|default:"—" }} |