NEW MODAL informacje o serwerze
This commit is contained in:
@ -109,17 +109,26 @@
|
||||
<input type="checkbox" name="enabled" value="1"
|
||||
onchange="this.form.submit()" {% if h.disable_regex_deploy %}checked{% endif %}>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex flex-wrap gap-1">
|
||||
<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>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex flex-wrap gap-1">
|
||||
<a href="{{ url_for('edit_server', id=h.id) }}" class="btn btn-primary btn-sm">Edytuj</a>
|
||||
|
||||
{% if h.use_daemon and h.type == 'linux' %}
|
||||
<!-- Serwery z demonem – nowy sposób -->
|
||||
<button class="btn btn-info btn-sm test-daemon-btn" data-host-id="{{ h.id }}">
|
||||
Testuj
|
||||
</button>
|
||||
{% else %}
|
||||
<!-- Dotychczasowy sposób dla SSH/Mikrotik -->
|
||||
<a href="{{ url_for('test_server_connection', id=h.id) }}" class="btn btn-info btn-sm">Testuj</a>
|
||||
{% endif %}
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@ -128,6 +137,42 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal z informacjami -->
|
||||
<div class="modal fade" id="serverInfoModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Informacje o serwerze</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><strong>Host:</strong> <span id="modal-hostname"></span> (<span id="modal-ip"></span>)</p>
|
||||
|
||||
<label><strong>CPU:</strong></label>
|
||||
<div class="progress mb-3">
|
||||
<div id="modal-cpu" class="progress-bar" role="progressbar"></div>
|
||||
</div>
|
||||
|
||||
<label><strong>Pamięć:</strong></label>
|
||||
<div class="progress mb-3">
|
||||
<div id="modal-mem" class="progress-bar bg-warning" role="progressbar"></div>
|
||||
</div>
|
||||
|
||||
<label><strong>Dysk:</strong></label>
|
||||
<div class="progress mb-3">
|
||||
<div id="modal-disk" class="progress-bar bg-success" role="progressbar"></div>
|
||||
</div>
|
||||
|
||||
<p><strong>Czas działania:</strong> <span id="modal-uptime"></span></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Zamknij</button>
|
||||
</div>
|
||||
</div>
|
||||
</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 z CSV</a>
|
||||
|
Reference in New Issue
Block a user