refactor web interface
This commit is contained in:
61
templates/server_list.html
Normal file
61
templates/server_list.html
Normal file
@ -0,0 +1,61 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Lista serwerów - /etc/hosts Manager{% endblock %}
|
||||
{% block extra_css %}
|
||||
{{ super() }}
|
||||
<style>
|
||||
.tooltip-inner {
|
||||
max-width: 300px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Lista serwerów</h2>
|
||||
</div>
|
||||
<div class="card-body table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nazwa hosta</th>
|
||||
<th>Użytkownik SSH</th>
|
||||
<th>Port</th>
|
||||
<th>Typ</th>
|
||||
<th>Metoda uwierzytelniania</th>
|
||||
<th>Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for h in hosts %}
|
||||
<tr>
|
||||
<td>{{ h.id }}</td>
|
||||
<td data-bs-toggle="tooltip" data-bs-placement="top" title="{{ h.resolved_hostname }}">
|
||||
{{ h.hostname }}
|
||||
</td>
|
||||
<td>{{ h.username }}</td>
|
||||
<td>{{ h.port }}</td>
|
||||
<td>{{ h.type }}</td>
|
||||
<td>{{ h.auth_method }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('edit_server', id=h.id) }}" class="btn btn-primary btn-sm">Edytuj</a>
|
||||
<a href="{{ url_for('test_server_connection', id=h.id) }}" class="btn btn-info btn-sm">Testuj</a>
|
||||
<a href="{{ url_for('server_backup', host_id=h.id) }}" class="btn btn-success btn-sm">Backup</a>
|
||||
<form method="GET" action="{{ url_for('delete_server', id=h.id) }}" style="display:inline;">
|
||||
<button type="submit" class="btn btn-danger btn-sm">Usuń</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 text-center">
|
||||
<a href="{{ url_for('add_server') }}" class="btn btn-secondary">Dodaj nowy serwer</a>
|
||||
<a href="{{ url_for('import_servers') }}" class="btn btn-secondary">Importuj serwery z CSV</a>
|
||||
<a href="{{ url_for('export_servers_to_csv') }}" class="btn btn-secondary">Eksportuj serwery do CSV</a>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user