{% extends 'base.html' %} {% from '_partials/page_header.html' import page_header %} {% block title %}Serial · Port Settings{% endblock %} {% block content %} {{ page_header('Serial', tabs=tabs, active_tab='port_settings') }}
{% for connection in connections %}
{% if connection.enable == 'on' and connection.port %} {% else %} {% endif %}
Name
{% if connection.enable == 'on' and connection.port %} Connect {% elif not connection.port %} No port {% else %} Disabled {% endif %}
{# Narrow fixed columns for the short fields, so the serial params sit inline on the same row instead of wrapping. #}
{# Console sockets only. The enumerator also reports serial interfaces that are not console ports; offering them here invites wiring a console to hardware that isn't one. #} {% set console_ports = port_mappings | selectattr('kind', 'equalto', 'port') | list %} {% set known = console_ports | map(attribute='device') | list %} {% if connection.device and connection.device not in known %}

Not present on this device — this console cannot connect.

{% endif %}
{% set sp = split_params(connection.params) %} {# Under RFC2217 the client sets these over the network, so showing them as editable would imply the device decides. #}
{# A disabled select submits nothing, so carry the values through and keep what is on file. #}
{% endfor %}
{% endblock %} {% block scripts %} {% endblock %}