2023-04-13 09:54:05 +00:00
|
|
|
<!DOCTYPE html>
|
2023-04-19 07:34:40 +00:00
|
|
|
<html>
|
2023-04-13 09:54:05 +00:00
|
|
|
<head>
|
2023-04-19 07:34:40 +00:00
|
|
|
<title>Panel administracyjny</title>
|
2023-04-19 10:12:38 +00:00
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
2023-04-13 09:54:05 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2023-04-19 10:12:38 +00:00
|
|
|
<div class="container">
|
|
|
|
<h1 class="my-5">Lista maszyn</h1>
|
|
|
|
<table class="table table-striped table-hover">
|
|
|
|
<thead>
|
2023-04-19 07:43:00 +00:00
|
|
|
<tr>
|
2023-04-19 10:16:23 +00:00
|
|
|
<th>Nazwa maszyny(token)</th>
|
2023-04-19 10:12:38 +00:00
|
|
|
<th>Obraz</th>
|
2023-04-19 10:16:23 +00:00
|
|
|
<th>Czas uruchomienia ({{ timezone }})</th>
|
2023-04-19 10:12:38 +00:00
|
|
|
<th>IP uVPN</th>
|
|
|
|
<th>IP lokalne</th>
|
|
|
|
<th></th>
|
2023-04-19 07:43:00 +00:00
|
|
|
</tr>
|
2023-04-19 10:12:38 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for machine in machines %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ machine.name }}</td>
|
|
|
|
<td>{{ machine.image_name }}</td>
|
|
|
|
<td>{{ machine.start_time }}</td>
|
|
|
|
<td>{{ machine.ipvpn }}</td>
|
|
|
|
<td>{{ machine.iplocal }}</td>
|
|
|
|
<td><button class="btn btn-primary" onclick="ssh('{{ machine.ipvpn }}', '{{ machine.username }}', '{{ machine.password }}')">SSH</button></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2023-04-19 07:34:40 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
function ssh(ipvpn, username, password) {
|
2023-04-19 10:12:38 +00:00
|
|
|
const currentLocation = window.location;
|
|
|
|
const newUrl = currentLocation.protocol + '//' + currentLocation.hostname + ':' + {{ ssh_port }} + "/?hostname="+ipvpn+"&username="+username+"&password="+btoa(password);
|
|
|
|
window.open(newUrl,"_blank");
|
2023-04-19 07:34:40 +00:00
|
|
|
}
|
|
|
|
</script>
|
2023-04-13 09:54:05 +00:00
|
|
|
</body>
|
2023-04-19 07:34:40 +00:00
|
|
|
</html>
|