{% load i18n %} {% block main %}
{% with src=rulesmatrix|first %} {% for dest in src.targets %} {% endfor %} {% endwith %} {% for row in rulesmatrix %} {% for dest in row.targets %} {% endfor %} {% endfor %}

{% trans "Router Rule Grid" %}

{% csrf_token %}
{% trans "Destination" %}→
↓{% trans "Source" %}
{{ dest.networkname }}
{% if dest.subnetname|length > 0 %} {% blocktrans trimmed with dest_subnetname=dest.subnetname %} Subnet: {{ dest_subnetname }}{% endblocktrans %}
{% endif %} {{ dest.cidr }}
{{ row.source.networkname }} {% if row.source.subnetname|length > 0 %}
{% blocktrans trimmed with row_source_subnetname=row.source.subnetname %} Subnet: {{ row_source_subnetname }}{% endblocktrans %} {% endif %}
{{ row.source.cidr }}
{% csrf_token %} {% if dest.rule_to_delete %}
{% endif %} {% if dest.reachable == 'none' %}
{% elif dest.reachable == 'full' %}
{% if not dest.cidr == row.source.cidr %} {% else %}         {% endif %}
{% else %} {% endif %}

{% trans "Description" %}

{% blocktrans trimmed %} The color and icon of an intersection indicates whether or not traffic is permitted from the source (row) to the destination (column). Clicking the button in the intersection will install a rule to switch the traffic behavior.
Note: Rules only affect one direction of traffic. The opposite direction is outlined when hovering over an intersection. {% endblocktrans %}

{% endblock %}