summaryrefslogtreecommitdiff
path: root/localwebsite/templates-web/routing_ipsets_page.twig
blob: 5996e6861f6318d422d8f0b4f91ad68c02c903d2 (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
{% include 'routing_header.twig' with {
  selected_tab: 'ipsets'
} %}

<div class="mt-2 text-secondary">
  Таблицы расположены в порядке применения правил iptables.
</div>

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

  {% if ips %}
    {% for ip in ips %}
      <div>{{ ip }} (<a href="/routing/ipsets/del/?set={{ set }}&amp;ip={{ ip }}" onclick="return confirm('Подтвердите удаление {{ ip }} из {{ set }}.')">удалить</a>)</div>
    {% endfor %}
  {% else %}
    <span class="text-secondary">Нет записей.</span>
  {% endif %}

  <div style="max-width: 300px">
    <form method="post" action="/routing/ipsets/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">Добавить</button>
      </div>
    </form>
  </div>
{% endfor %}