{% 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 %} {% trans "Subnet" %}: {{ dest.subnetname }}
{% endif %} {{ dest.cidr }}
{{ row.source.networkname }} {% if row.source.subnetname|length > 0 %}
{% trans "Subnet" %}: {{ row.source.subnetname }} {% 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 %}
Conflict
{% endif %}

{% trans "Description" %}

{% blocktrans %}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 %}