summaryrefslogtreecommitdiff
path: root/web/kbn_templates/routing_rules.j2
blob: 61b68c9cd17e1de1d13fa664f0e4a54a205a438b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% extends "base.j2" %}

{% block content %}
{% include 'routing_header.j2' %}

<div class="mt-2 text-secondary">{{ "routing_iptables_note"|lang }}</div>

{% for set, ips in sets.items() %}
    <h6 class="text-primary mt-4">{{ set }}</h6>

    {% if ips %}
        {% for ip in ips %}
            <div>{{ ip }} (<a href="/routing/rules.cgi?action=del&amp;set={{ set }}&amp;ip={{ ip }}" onclick="return confirm('{{ 'routing_deleting_confirmation'|lang|format(ip, set) }}')">{{ "routing_del"|lang }}</a>)</div>
        {% endfor %}
    {% else %}
        <span class="text-secondary">{{ "routing_no_records"|lang }}</span>
    {% endif %}

    <div style="max-width: 300px">
        <form method="get" action="/routing/rules.cgi">
            <input type="hidden" name="action" value="add">
            <input type="hidden" name="set" value="{{ set }}">
            <div class="input-group mt-2">
                <input type="text" name="ip" placeholder="x.x.x.x/y" class="form-control">
                <button type="submit" class="btn btn-outline-primary">{{ "routing_add"|lang }}</button>
            </div>
        </form>
    </div>
{% endfor %}
{% endblock %}