{# Out-of-band: keep the service bar in step with the polled session. #}

{{ service.state_label }}

{{ service.message }}

{# Out-of-band: the join QR follows the session, so it appears once the profiler writes its info file and clears once it stops. #}
{% if session.wifi_qr %}

Scan to join {{ session.ssid }}

{% endif %}
{% if session.live %} {# Polled marker read by profiler.js to toast newly profiled clients. #}
{{ session.state | capitalize }} {% if session.uptime %}up {{ session.uptime }}{% endif %} {% if session.profiler_version %}profiler {{ session.profiler_version }}{% endif %}
{{ session.profile_count }} Profiled
{{ session.failed_profile_count }} Failed
{{ session.total_clients_seen }} Clients seen
{{ session.invalid_frame_count }} Invalid frames
{{ session.bad_fcs_count }} Bad FCS
Mode
{{ session.mode or 'n/a' }}
Channel
{{ session.channel or 'n/a' }}{% if session.frequency %} ({{ session.frequency }} MHz){% endif %}
Country
{{ session.country_code or 'n/a' }}
PHY
{{ session.phy or 'n/a' }}
AP interface
{{ session.ap_interface or 'n/a' }}
Monitor interface
{{ session.monitor_interface or 'n/a' }}
SSID
{{ session.ssid or 'n/a' }}
Passphrase
{{ session.passphrase or 'n/a' }}
BSSID
{{ session.bssid or 'n/a' }}
Started
{{ session.started_at or 'n/a' }}
Last profile
{% if session.last_profile %}{{ session.last_profile }}{% if session.last_profile_timestamp %} ({{ session.last_profile_timestamp }}){% endif %}{% else %}n/a{% endif %}
{% elif session.has_last_session %}
{{ session.last.status | capitalize or 'Stopped' }} {% if session.last.ended_at %}ended {{ session.last.ended_at }}{% endif %} {% if session.last.duration %}ran {{ session.last.duration }}{% endif %}
{% if session.last.reason or session.last.message %}

{{ session.last.reason or 'n/a' }}{% if session.last.message %}: {{ session.last.message }}{% endif %}

{% endif %}
{{ session.last.profile_count }} Profiled
{{ session.last.failed_profile_count }} Failed
{{ session.last.total_clients_seen }} Clients seen
Mode
{{ session.last.mode or 'n/a' }}
Channel
{{ session.last.channel or 'n/a' }}{% if session.last.frequency %} ({{ session.last.frequency }} MHz){% endif %}
SSID
{{ session.last.ssid or 'n/a' }}
Started
{{ session.last.started_at or 'n/a' }}
Ended
{{ session.last.ended_at or 'n/a' }}
Last profile
{{ session.last.last_profile or 'n/a' }}
{% else %}

No profiler session recorded yet. Start the profiler to begin.

{% endif %}