From 3cf207047ed46492857f722c66b06ea2cdc77fee Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 26 Jan 2023 16:16:00 +0100 Subject: [PATCH] Remove unimplemented DNAT settings For now. --- web/__init__.py | 3 --- web/dnat.py | 16 ---------------- web/templates/dnat/index.html | 15 --------------- web/templates/index.html | 1 - 4 files changed, 35 deletions(-) delete mode 100644 web/dnat.py delete mode 100644 web/templates/dnat/index.html diff --git a/web/__init__.py b/web/__init__.py index 3270862..0bb99c2 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -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) diff --git a/web/dnat.py b/web/dnat.py deleted file mode 100644 index c11ea32..0000000 --- a/web/dnat.py +++ /dev/null @@ -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()) diff --git a/web/templates/dnat/index.html b/web/templates/dnat/index.html deleted file mode 100644 index b2d0738..0000000 --- a/web/templates/dnat/index.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'base.html' %} - -{% block content %} -

-Tu lahko urejate preusmeritve DNAT za IPv4. - -

-{% for int_ip, ext_ip in dnat %} -

- - -{% endfor %} - -

-{% endblock %} diff --git a/web/templates/index.html b/web/templates/index.html index 85e0b7b..e9e2b2e 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -7,7 +7,6 @@
  • Skupine
  • Luknje {% endif %} -
  • DNAT
  • VPN {% endblock %}