From 3c8bfbc009d707f96744ee89e4c256895335f5e4 Mon Sep 17 00:00:00 2001 From: lelo Date: Sun, 23 Mar 2025 14:35:59 +0100 Subject: [PATCH] rename files --- analytics.py | 4 +-- app.py | 6 ++-- auth.py | 4 +-- templates/{network.html => connections.html} | 14 ++++----- templates/dashboard.html | 33 ++++++++++++++------ templates/error.html | 21 ------------- templates/index.html | 20 ------------ templates/{overview.html => mylinks.html} | 30 +++++++++++++----- 8 files changed, 58 insertions(+), 74 deletions(-) rename templates/{network.html => connections.html} (84%) rename templates/{overview.html => mylinks.html} (69%) diff --git a/analytics.py b/analytics.py index 8a3ac04..82e87fd 100644 --- a/analytics.py +++ b/analytics.py @@ -87,8 +87,8 @@ def return_file_access(): return [] @require_secret -def network(): - return render_template('network.html') +def connections(): + return render_template('connections.html') @require_secret def dashboard(): diff --git a/app.py b/app.py index da52ee1..c175c65 100755 --- a/app.py +++ b/app.py @@ -32,8 +32,9 @@ if os.environ.get('FLASK_ENV') == 'production': app.config['SESSION_COOKIE_SECURE'] = True app.add_url_rule('/dashboard', view_func=a.dashboard) -app.add_url_rule('/network', view_func=a.network) -app.add_url_rule('/overview', view_func=auth.overview) +app.add_url_rule('/connections', view_func=a.connections) +app.add_url_rule('/mylinks', view_func=auth.mylinks) +app.add_url_rule('/remove_secret', view_func=auth.remove_secret, methods=['POST']) socketio = SocketIO(app, async_mode='eventlet') background_thread_running = False @@ -332,7 +333,6 @@ def query_recent_connections(): connections = [ { 'timestamp': row[0], - 'full_path': row[1], 'ip_address': row[2], 'user_agent': row[3], 'referrer': row[4] diff --git a/auth.py b/auth.py index 4dff268..8ec5c08 100644 --- a/auth.py +++ b/auth.py @@ -80,7 +80,7 @@ def require_secret(f): @require_secret -def overview(): +def mylinks(): allowed_secrets = session.get('allowed_secrets', []) host = request.host @@ -107,7 +107,7 @@ def overview(): else: secret_folders[secret] = [] - return render_template('overview.html', + return render_template('mylinks.html', allowed_secrets=allowed_secrets, secret_qr_codes=secret_qr_codes, secret_folders=secret_folders) \ No newline at end of file diff --git a/templates/network.html b/templates/connections.html similarity index 84% rename from templates/network.html rename to templates/connections.html index dde6c98..488273c 100644 --- a/templates/network.html +++ b/templates/connections.html @@ -26,19 +26,18 @@
-
-

Downloads in den letzten 10 Minute

-
- Home - Dashboard -
+

Downloads in den letzten 10 Minute

+
- @@ -69,7 +68,6 @@ const row = document.createElement('tr'); row.innerHTML = ` - diff --git a/templates/dashboard.html b/templates/dashboard.html index dd7e506..769c757 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -6,21 +6,34 @@ Dashboard - Verbindungsanalyse -
-

Dashboard - Verbindungsanalyse({{ timeframe }})

- +
+

Dashboard - Verbindungsanalyse ({{ timeframe }})

+ diff --git a/templates/error.html b/templates/error.html index da86172..ad7a243 100644 --- a/templates/error.html +++ b/templates/error.html @@ -13,27 +13,6 @@ -
- -
TimestampFull Path IP Address User Agent Referrer${record.timestamp}${record.full_path} ${record.ip_address} ${record.user_agent} ${record.referrer}