From 7c86799250043042e8979cfba220cad6e584dd94 Mon Sep 17 00:00:00 2001 From: Mateusz779 Date: Wed, 19 Apr 2023 12:16:23 +0200 Subject: [PATCH] dodano strefe czasowa i poprawiono bugi --- app.py | 5 +++-- templates/index.html | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 74bd8ba..8234abd 100644 --- a/app.py +++ b/app.py @@ -24,7 +24,7 @@ def main(): if db.get_user_bytoken(auth_token) is None: return redirect("/login") machines_all = db.get_machines() - return render_template('index.html', ssh_port=config.webssh_port, machines=machines_all.machines) + return render_template('index.html', ssh_port=config.webssh_port, machines=machines_all.machines, timezone=config.timezone) @app.route('/login') @@ -32,7 +32,8 @@ def login(): auth_token = request.cookies.get('auth_token') if auth_token != "" or auth_token is not None: if db.get_user_bytoken(auth_token) is not None: - return render_template('index.html') + machines_all = db.get_machines() + return render_template('index.html', ssh_port=config.webssh_port, machines=machines_all.machines, timezone=config.timezone) return render_template('login.html') diff --git a/templates/index.html b/templates/index.html index b73a211..17e8897 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,9 +10,9 @@ - + - +
Nazwa maszynyNazwa maszyny(token) ObrazCzas uruchomieniaCzas uruchomienia ({{ timezone }}) IP uVPN IP lokalne