diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-02-19 01:44:02 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-02-19 01:44:11 +0300 |
commit | 3741f7cf78a288e967415ccb6736c888a21c211b (patch) | |
tree | a48d8331c9936d6c108de4d0f9179a089b1e56e6 /web/kbn_templates/routing_rules.j2 | |
parent | d79309e498cdc1358c81367ce2a93a5731e517d1 (diff) |
web_kbn: almost completely ported lws to python
Diffstat (limited to 'web/kbn_templates/routing_rules.j2')
-rw-r--r-- | web/kbn_templates/routing_rules.j2 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/web/kbn_templates/routing_rules.j2 b/web/kbn_templates/routing_rules.j2 new file mode 100644 index 0000000..61b68c9 --- /dev/null +++ b/web/kbn_templates/routing_rules.j2 @@ -0,0 +1,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&set={{ set }}&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 %}
\ No newline at end of file |