Remove unimplemented DNAT settings

For now.
This commit is contained in:
Timotej Lazar 2023-01-26 16:16:00 +01:00
parent 388061130e
commit 3cf207047e
4 changed files with 0 additions and 35 deletions

View file

@ -50,9 +50,6 @@ def create_app(test_config=None):
from . import config
app.register_blueprint(config.blueprint)
from . import dnat
app.register_blueprint(dnat.blueprint)
from . import vpn
app.register_blueprint(vpn.blueprint)

View file

@ -1,16 +0,0 @@
import flask
import flask_login
#from .db import get_db
blueprint = flask.Blueprint('dnat', __name__, url_prefix='/dnat')
@blueprint.route('/', methods=('GET', 'POST'))
@flask_login.login_required
def index():
# with get_db() as db:
# if flask.request.method == 'POST':
# for name, value in flask.request.form.items():
# db.execute('INSERT INTO setting(name, value) VALUES(:name, :value) ON CONFLICT(name) DO UPDATE SET value = :value', ({"name": name, "value": value}))
# dnat = [tuple(row) for row in (db.execute('SELECT ext_ip, int_ip FROM dnat'))]
return flask.render_template('dnat/index.html', **locals())

View file

@ -1,15 +0,0 @@
{% extends 'base.html' %}
{% block content %}
<p>
Tu lahko urejate preusmeritve DNAT za IPv4.
<form id="request" method="POST">
{% for int_ip, ext_ip in dnat %}
<p>
<input name="ext_ip" value="{{ ext_ip }}"/>
<input name="int_ip" value="{{ int_ip }}"/>
{% endfor %}
<button id="submit" type="submit">Shrani</button>
</form>
{% endblock %}

View file

@ -7,7 +7,6 @@
<li><a href="{{ url_for('config.edit', name='groups') }}">Skupine
<li><a href="{{ url_for('config.edit', name='forwards') }}">Luknje
{% endif %}
<li><a href="{{ url_for('dnat.index') }}">DNAT
<li><a href="{{ url_for('vpn.index') }}">VPN
</ul>
{% endblock %}