fix
This commit is contained in:
parent
beed694eca
commit
820b839af4
2
app.py
2
app.py
@ -24,7 +24,7 @@ def main():
|
|||||||
if db.get_user_bytoken(auth_token) is None:
|
if db.get_user_bytoken(auth_token) is None:
|
||||||
return redirect("/login")
|
return redirect("/login")
|
||||||
machines_all = db.get_machines()
|
machines_all = db.get_machines()
|
||||||
return render_template('index.html', ssh_port=config.webssh_port, table=machines_all)
|
return render_template('index.html', ssh_port=config.webssh_port, machines=machines_all)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/login')
|
@app.route('/login')
|
||||||
|
@ -60,7 +60,27 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Lista maszyn</h1>
|
<h1>Lista maszyn</h1>
|
||||||
{{table}}
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Nazwa maszyny</th>
|
||||||
|
<th>Obraz</th>
|
||||||
|
<th>Czas uruchomienia</th>
|
||||||
|
<th>IP uVPN</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for machine in machines %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ machine.name }}</td>
|
||||||
|
<td>{{ machine.image_name }}</td>
|
||||||
|
<td>{{ machine.start_time }}</td>
|
||||||
|
<td>{{ machine.ip }}</td>
|
||||||
|
<td><button onclick="ssh('{{ machine.ip, machine.username, machine.password }}')">SSH</button></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
Reference in New Issue
Block a user