modified: app.py
modified: templates/index.html
This commit is contained in:
3
app.py
3
app.py
@@ -74,8 +74,7 @@ def get_db_connection():
|
|||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
if "username" in session:
|
if "username" in session:
|
||||||
bot_stats = get_bot_statistics()
|
return render_template("index.html", bot_running=bot_status())
|
||||||
return render_template("index.html", bot_running=bot_status(), **bot_stats)
|
|
||||||
return redirect(url_for("login"))
|
return redirect(url_for("login"))
|
||||||
|
|
||||||
@app.route("/login", methods=["GET", "POST"])
|
@app.route("/login", methods=["GET", "POST"])
|
||||||
|
|||||||
@@ -28,9 +28,6 @@
|
|||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
||||||
<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>
|
||||||
|
|||||||
Reference in New Issue
Block a user