{# SPDX-License-Identifier: AGPL-3.0-only Copyright 2026 Mouad Lyaazale. Additional terms (author attribution, names): see NOTICE. -#} {% extends "base.html" %} {% from "_macros.html" import spark %} {% block title %}Switches{% endblock %} {% block nav_switches %}active{% endblock %} {% block content %}

Switches{% if current_site %} · {{ site_names.get(current_site, "No site") }}{% endif %}

Read-only assessment against the {{ project }} specification, Levels 1{% if level3 %} to 3{% else %} and 2{% endif %}.{% if current_site %} Show all sites{% endif %}

Add switch
{% if current_site %}{% endif %}
{% if site_rows %}
{% for s in site_rows %} {% set key = s.id or "-" %} {% endfor %}
SiteSwitchesScannedLevel 1Level 2Failed controls
{{ s.name }} {{ s.devices }} {{ s.scanned }} {{ s.level1 }} / {{ s.devices }} {{ s.level2 }} / {{ s.devices }} {{ s.fail }} {% if s.id and s.scanned %}Report{% endif %}
{% endif %}
Switches{{ totals.devices }}
Scanned{{ totals.scanned }}
Level 1 reached{{ totals.level1 }} / {{ totals.devices }}
Failed controls{{ totals.fail }}
Trend (failed controls / day){{ spark(trend|map(attribute="fail")|list, 200, 40) }} {% if schedule.enabled %}Scheduled {{ schedule.time }}{% else %}Schedule scans{% endif %}
{% if discovered %}
{{ discovered }} switch{{ "es" if discovered > 1 }} discovered on the network but not in {{ project }} yet. Review
{% endif %} {% if not jump_ready and rows|selectattr("device.via_jump")|list %}
Some switches are reached through a jump host, but none is configured. Configure it.
{% endif %} {% if rows %}
{% for row in rows %} {% set d = row.device %}{% set r = row.result %} {% endfor %}
SwitchModel · firmwareLevelControlsLast scan
{{ d.id }}
{{ d.host }}{% if d.port != 22 %}:{{ d.port }}{% endif %}{% if d.via_jump %} jump{% endif %}{% if row.site and not current_site %} {{ site_names.get(row.site, row.site) }}{% endif %}
{% if r and r.model %}{{ r.model }}
{{ r.firmware }}
{% else %}{{ d.vendor }}{% endif %}
{% if r %}Level {{ r.summary.achieved_level }} {% else %}—{% endif %} {% if r %} {% set s = r.summary %}{% set total = s.pass + s.fail + s.unknown %}
{{ s.pass }} pass · {{ s.fail }} fail · {{ s.unknown }} unknown {% else %}not scanned{% endif %}
{{ r.scanned_at.replace("T", " ")[:16] if r else "—" }}
Edit
{% else %}

No switches yet

Add a switch with its SSH address and a read-only account.

Add your first switch
{% endif %} {% endblock %}