Add form for editing ipsets
This commit is contained in:
parent
a5df435931
commit
5add39a8a7
7 changed files with 88 additions and 4 deletions
|
@ -33,6 +33,12 @@ pre {
|
|||
padding: 0.5em;
|
||||
margin: 0;
|
||||
}
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
th, td {
|
||||
padding-right: 1em;
|
||||
}
|
||||
ul.keys {
|
||||
margin: 0 0.5em 0.5em;
|
||||
padding-left: 1em;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<dd>status opek v požarnem zidu
|
||||
<dt><a href="{{ url_for('config.index') }}">Nastavitve</a>
|
||||
<dd>nastavitve aplikacije FRIwall
|
||||
<dt><a href="{{ url_for('config.edit', name='ipsets') }}">Obsegi IP</a>
|
||||
<dd>definicije obsegov IP
|
||||
<dt><a href="{{ url_for('ipsets.index') }}">Območja IP</a>
|
||||
<dd>definicije območij IP
|
||||
<dt><a href="{{ url_for('rules.index') }}">Urejanje pravil</a>
|
||||
<dd>pravila za posredovanje prometa
|
||||
<dt><a href="{{ url_for('nat.index') }}">NAT</a>
|
||||
|
|
27
web/templates/ipsets/index.html
Normal file
27
web/templates/ipsets/index.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
Urejate območja IP. Za vsako območje lahko dodate enega ali več obsegov IP in/ali IPv6, ločenih s presledki.
|
||||
|
||||
<form id="request" method="POST">
|
||||
<table>
|
||||
<thead>
|
||||
<th>Ime<th>IP<th>IPv6
|
||||
<tbody>
|
||||
<tbody>
|
||||
{% for name, addresses in ipsets.items() %}
|
||||
<tr>
|
||||
<td><input name="name" value="{{ name }}" />
|
||||
<td><input name="ip" value="{{ addresses.ip|join(' ') }}" />
|
||||
<td><input name="ip6" value="{{ addresses.ip6|join(' ') }}" />
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td><input name="name" />
|
||||
<td><input name="ip" />
|
||||
<td><input name="ip6" />
|
||||
</table>
|
||||
<p><button id="submit" type="submit">Shrani</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{% block content %}
|
||||
<p>
|
||||
Urejate pravilo #{{ index }}. <a href="{{ url_for('rules.index') }}">Seznam pravil.</a>
|
||||
Urejate pravilo #{{ index }}. V pravilih lahko uporabljate imena območij IP, prikazana spodaj. <a href="{{ url_for('rules.index') }}">Seznam pravil.</a>
|
||||
|
||||
<form id="request" method="POST">
|
||||
<p>
|
||||
|
@ -22,4 +22,16 @@ Uporabniki, ki lahko o(ne)mogočijo pravilo<br>
|
|||
<p><button id="submit" type="submit">Shrani</button>
|
||||
</form>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th>Območje<th>IP<th>IPv6
|
||||
<tbody>
|
||||
{% for network, addresses in ipsets.items() %}
|
||||
<tr>
|
||||
<td>{{ network }}
|
||||
<td>{{ addresses.ip|join('<br>')|safe }}
|
||||
<td>{{ addresses.ip6|join('<br>')|safe }}
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue