{% extends 'base/layout.html' %} {% block title %}Config Search{% endblock %} {% block content %}

Configuration Search

{% if query %}
{% if total_count %} {{ total_count }} device{{ total_count|pluralize }} matched "{{ query }}" {% if page_obj.paginator.num_pages > 1 %} — page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }} {% endif %} {% else %} No results for "{{ query }}" {% endif %}
{% endif %}
{% if error %}
{{ error }}
{% endif %} {% for result in results %}
{% if result.device %} {{ result.device.name }} {% else %} (no device match) {% endif %} {{ result.indexed_at|date:"Y-m-d H:i" }}
{# Each line is escaped server-side and marked safe by render_line — config content never reaches the page unescaped #} {% for line in result.lines %} {% endfor %}
{% if result.device %}{{ line.lineno }}{% else %}{{ line.lineno }}{% endif %} {{ line.html }}
{% if result.more_lines %}
+{{ result.more_lines }} more matching line{{ result.more_lines|pluralize }}
{% endif %}
{% endfor %} {% if page_obj.paginator.num_pages > 1 %} {% endif %}
{% endblock content %}