git add templatesgit add templates OBSLUGA DEMONAgit add templates
This commit is contained in:
@ -1,29 +1,32 @@
|
||||
{% 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>
|
||||
{{ 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">
|
||||
<table class="table table-striped align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nazwa hosta</th>
|
||||
<th>Użytkownik SSH</th>
|
||||
<th>Użytkownik</th>
|
||||
<th>Port</th>
|
||||
<th>Typ</th>
|
||||
<th>Metoda uwierzytelniania</th>
|
||||
<th>Uwierzytelnianie</th>
|
||||
<th>Wybrany plik /etc/hosts</th> <!-- Nowa kolumna -->
|
||||
<th>Auto Deploy</th>
|
||||
<th>Auto Backup</th>
|
||||
<th>Akcje</th>
|
||||
@ -38,20 +41,50 @@
|
||||
</td>
|
||||
<td>{{ h.username }}</td>
|
||||
<td>{{ h.port }}</td>
|
||||
<td>{{ h.type }}</td>
|
||||
<td>{{ h.auth_method }}</td>
|
||||
<!-- Formularz aktualizujący automatyczny deploy dla serwera -->
|
||||
<td>
|
||||
{% if h.type == 'linux' %}
|
||||
Linux{% if h.use_daemon %} (Demon){% endif %}
|
||||
{% else %}
|
||||
Mikrotik
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if h.use_daemon and h.type == 'linux' %}
|
||||
<em>- używa Demona -</em>
|
||||
{% else %}
|
||||
{% if h.auth_method == 'password' %}
|
||||
Hasło
|
||||
{% elif h.auth_method == 'ssh_key' %}
|
||||
Klucz SSH
|
||||
{% elif h.auth_method == 'global_key' %}
|
||||
Globalny klucz
|
||||
{% else %}
|
||||
{{ h.auth_method }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<!-- Nowa kolumna: preferowany plik hosts -->
|
||||
<td>
|
||||
{% if h.preferred_hostfile %}
|
||||
{{ h.preferred_hostfile.title }}
|
||||
{% else %}
|
||||
(Default)
|
||||
{% endif %}
|
||||
</td>
|
||||
<!-- Formularz aktualizujący auto_deploy -->
|
||||
<td>
|
||||
<form method="POST" action="{{ url_for('update_host_automation', id=h.id) }}" style="display:inline;">
|
||||
<input type="hidden" name="setting" value="auto_deploy">
|
||||
<input type="checkbox" name="enabled" value="1" onchange="this.form.submit()" {% if h.auto_deploy_enabled %}checked{% endif %}>
|
||||
<input type="checkbox" name="enabled" value="1"
|
||||
onchange="this.form.submit()" {% if h.auto_deploy_enabled %}checked{% endif %}>
|
||||
</form>
|
||||
</td>
|
||||
<!-- Formularz aktualizujący automatyczny backup dla serwera -->
|
||||
<!-- Formularz aktualizujący auto_backup -->
|
||||
<td>
|
||||
<form method="POST" action="{{ url_for('update_host_automation', id=h.id) }}" style="display:inline;">
|
||||
<input type="hidden" name="setting" value="auto_backup">
|
||||
<input type="checkbox" name="enabled" value="1" onchange="this.form.submit()" {% if h.auto_backup_enabled %}checked{% endif %}>
|
||||
<input type="checkbox" name="enabled" value="1"
|
||||
onchange="this.form.submit()" {% if h.auto_backup_enabled %}checked{% endif %}>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
@ -71,7 +104,7 @@
|
||||
|
||||
<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>
|
||||
<a href="{{ url_for('import_servers') }}" class="btn btn-secondary">Importuj z CSV</a>
|
||||
<a href="{{ url_for('export_servers_to_csv') }}" class="btn btn-secondary">Eksportuj do CSV</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user