rename files
This commit is contained in:
parent
99b0b8b7db
commit
3c8bfbc009
@ -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():
|
||||
|
||||
6
app.py
6
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]
|
||||
|
||||
4
auth.py
4
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)
|
||||
@ -26,19 +26,18 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="p-3">
|
||||
<h1 class="mb-4">Downloads in den letzten 10 Minute</h1>
|
||||
<div class="mb-3">
|
||||
<a href="{{ url_for('index') }}" class="btn btn-primary">Home</a>
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-primary">Dashboard</a>
|
||||
</div>
|
||||
<a href="{{ url_for('index') }}" class="btn btn-primary">App</a>
|
||||
<a href="{{ url_for('mylinks') }}" class="btn btn-primary">Meine Links</a>
|
||||
<a href="{{ url_for('connections') }}" class="btn btn-primary">Verbindungen</a>
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-primary">Auswertung</a>
|
||||
</div>
|
||||
<div class="table-responsive table-container">
|
||||
<table class="table table-hover">
|
||||
<thead class="table-info">
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>Full Path</th>
|
||||
<th>IP Address</th>
|
||||
<th>User Agent</th>
|
||||
<th>Referrer</th>
|
||||
@ -69,7 +68,6 @@
|
||||
const row = document.createElement('tr');
|
||||
row.innerHTML = `
|
||||
<td>${record.timestamp}</td>
|
||||
<td>${record.full_path}</td>
|
||||
<td>${record.ip_address}</td>
|
||||
<td>${record.user_agent}</td>
|
||||
<td>${record.referrer}</td>
|
||||
@ -6,21 +6,34 @@
|
||||
<title>Dashboard - Verbindungsanalyse</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body { margin: 20px; }
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
/* Use full width */
|
||||
.container-fluid {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.card { margin-bottom: 20px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="container-fluid">
|
||||
<h1 class="mb-4">Dashboard - Verbindungsanalyse ({{ timeframe }})</h1>
|
||||
<!-- Timeframe selection buttons -->
|
||||
<div class="mb-3">
|
||||
<a href="{{ url_for('index') }}" class="btn btn-primary">Home</a>
|
||||
<a href="{{ url_for('network') }}" class="btn btn-primary">Netzwerk</a>
|
||||
<a href="{{ url_for('dashboard', timeframe='today') }}" class="btn btn-primary">Today</a>
|
||||
<a href="{{ url_for('dashboard', timeframe='7days') }}" class="btn btn-primary">Last 7 Days</a>
|
||||
<a href="{{ url_for('dashboard', timeframe='30days') }}" class="btn btn-primary">Last 30 Days</a>
|
||||
<a href="{{ url_for('dashboard', timeframe='365days') }}" class="btn btn-primary">Last 365 Days</a>
|
||||
<a href="{{ url_for('index') }}" class="btn btn-primary">App</a>
|
||||
<a href="{{ url_for('mylinks') }}" class="btn btn-primary">Meine Links</a>
|
||||
<a href="{{ url_for('connections') }}" class="btn btn-primary">Verbindungen</a>
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-primary">Auswertung</a>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<a href="{{ url_for('dashboard', timeframe='today') }}" class="btn btn-secondary btn-sm">Today</a>
|
||||
<a href="{{ url_for('dashboard', timeframe='7days') }}" class="btn btn-secondary btn-sm">Last 7 Days</a>
|
||||
<a href="{{ url_for('dashboard', timeframe='30days') }}" class="btn btn-secondary btn-sm">Last 30 Days</a>
|
||||
<a href="{{ url_for('dashboard', timeframe='365days') }}" class="btn btn-secondary btn-sm">Last 365 Days</a>
|
||||
</div>
|
||||
|
||||
<!-- Summary Cards -->
|
||||
|
||||
@ -13,27 +13,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<style>
|
||||
/* Header styles */
|
||||
.site-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 20px;
|
||||
background-color: #9bbbff; /* Using the theme color */
|
||||
color: #000000;
|
||||
}
|
||||
.site-header img.logo {
|
||||
height: 50px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.site-header h1 {
|
||||
font-size: 1.5em;
|
||||
margin: 0;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
|
||||
@ -13,26 +13,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<style>
|
||||
.site-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 20px;
|
||||
background-color: #9bbbff;
|
||||
color: #000000;
|
||||
}
|
||||
.site-header img.logo {
|
||||
height: 50px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.site-header h1 {
|
||||
font-size: 1.5em;
|
||||
margin: 0;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
|
||||
@ -2,11 +2,21 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Übersicht gültiger Verbindungen</title>
|
||||
<title>Meine Links</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
/* Use full width */
|
||||
.container-fluid {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.qr-code {
|
||||
max-width: 300px;
|
||||
display: block;
|
||||
@ -15,8 +25,14 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container my-5">
|
||||
<h1 class="mb-4">Übersicht deiner gültigen Verbindungen</h1>
|
||||
<div class="container-fluid">
|
||||
<h1 class="mb-4">Übersicht deiner gültigen Links</h1>
|
||||
<div class="mb-3">
|
||||
<a href="{{ url_for('index') }}" class="btn btn-primary">App</a>
|
||||
<a href="{{ url_for('mylinks') }}" class="btn btn-primary">Meine Links</a>
|
||||
<a href="{{ url_for('connections') }}" class="btn btn-primary">Verbindungen</a>
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-primary">Auswertung</a>
|
||||
</div>
|
||||
{% if allowed_secrets %}
|
||||
<div class="row">
|
||||
{% for secret in allowed_secrets %}
|
||||
@ -40,7 +56,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="text-muted">No folders available for this secret.</p>
|
||||
<p class="text-muted">Keine Ordner für dieses Gemeimnis hinterlegt.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -49,12 +65,10 @@
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
No valid secrets found.
|
||||
Du hast aktuell keine gültigen Links.
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap 5 JS Bundle -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user