modified: templates/index.html

modified:   templates/logs.html
This commit is contained in:
SimolZimol
2024-09-03 13:20:46 +02:00
parent 493d08e348
commit b680b5af21
2 changed files with 28 additions and 16 deletions

View File

@@ -1,11 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Panel</title> <title>Admin Panel</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head> </head>
<body> <body>
<div class="container mt-5"> <div class="container mt-5">
<h1 class="text-center">Discord Bot Admin Panel</h1> <h1 class="text-center">Discord Bot Admin Panel</h1>
@@ -17,15 +19,21 @@
{{ "Running" if bot_running else "Stopped" }} {{ "Running" if bot_running else "Stopped" }}
</span> </span>
</p> </p>
<a href="{{ url_for('start') }}" class="btn btn-primary btn-block {{ 'disabled' if bot_running else '' }}">Start Bot</a> <a href="{{ url_for('start') }}"
<a href="{{ url_for('stop') }}" class="btn btn-danger btn-block {{ 'disabled' if not bot_running else '' }}">Stop Bot</a> class="btn btn-primary btn-block {{ 'disabled' if bot_running else '' }}">Start Bot</a>
<a href="{{ url_for('stop') }}"
class="btn btn-danger btn-block {{ 'disabled' if not bot_running else '' }}">Stop Bot</a>
<a href="{{ url_for('settings') }}" class="btn btn-secondary btn-block">Settings</a> <a href="{{ url_for('settings') }}" class="btn btn-secondary btn-block">Settings</a>
<a href="{{ url_for('users') }}" class="btn btn-info btn-block">User Management</a> <a href="{{ url_for('users') }}" class="btn btn-info btn-block">User Management</a>
<a href="{{ url_for('logout') }}" class="btn btn-outline-secondary btn-block">Logout</a> <a href="{{ url_for('logout') }}" class="btn btn-outline-secondary btn-block">Logout</a>
<h5 class="card-title">Bot Statistics</h5>
<p class="card-text">Total Messages Processed: {{ total_messages }}</p>
<p class="card-text">Most Used Command: {{ most_used_command }}</p>
</div> </div>
</div> </div>
</div> </div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script>
</body> </body>
</html> </html>

View File

@@ -1,11 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bot Logs</title> <title>Bot Logs</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head> </head>
<body> <body>
<div class="container mt-5"> <div class="container mt-5">
<h1 class="text-center">Bot Logs</h1> <h1 class="text-center">Bot Logs</h1>
@@ -26,7 +28,8 @@
} }
</script> </script>
<pre id="log-content" style="height: 500px; overflow-y: scroll; background-color: #f8f9fa; padding: 10px; border: 1px solid #ddd;"></pre> <pre id="log-content"
style="height: 500px; overflow-y: scroll; background-color: #f8f9fa; padding: 10px; border: 1px solid #ddd;"></pre>
<a href="{{ url_for('index') }}" class="btn btn-secondary btn-block mt-3">Back to Dashboard</a> <a href="{{ url_for('index') }}" class="btn btn-secondary btn-block mt-3">Back to Dashboard</a>
</div> </div>
</div> </div>
@@ -45,4 +48,5 @@
window.onload = refreshLogs; window.onload = refreshLogs;
</script> </script>
</body> </body>
</html> </html>