dodano strefe czasowa i poprawiono bugi

This commit is contained in:
Mateusz779 2023-04-19 12:16:23 +02:00
parent 9dd1722c04
commit 7c86799250
2 changed files with 5 additions and 4 deletions

5
app.py
View File

@ -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')

View File

@ -10,9 +10,9 @@
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Nazwa maszyny</th>
<th>Nazwa maszyny(token)</th>
<th>Obraz</th>
<th>Czas uruchomienia</th>
<th>Czas uruchomienia ({{ timezone }})</th>
<th>IP uVPN</th>
<th>IP lokalne</th>
<th></th>