44 lines
1.5 KiB
HTML
44 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<h2>Router: {{ router.name }}</h2>
|
|
<p>Host: {{ router.host }} | Port: {{ router.port }} | SSH User: {{ router.ssh_user }}</p>
|
|
|
|
<!-- Akcje: Wykonaj export, Wykonaj backup binarny -->
|
|
<form action="{{ url_for('router_export', router_id=router.id) }}" method="POST" style="display:inline;">
|
|
<button type="submit">Wykonaj export (/export)</button>
|
|
</form>
|
|
|
|
<form action="{{ url_for('router_backup', router_id=router.id) }}" method="POST" style="display:inline;">
|
|
<button type="submit">Wykonaj backup binarny</button>
|
|
</form>
|
|
<a href="{{ url_for('edit_router', router_id=router.id) }}" class="btn btn-warning mb-3">
|
|
Edytuj ustawienia
|
|
</a>
|
|
<h3>Lista Backupów</h3>
|
|
<table border="1" cellpadding="5" cellspacing="0">
|
|
<tr>
|
|
<th>Data</th>
|
|
<th>Plik</th>
|
|
<th>Typ</th>
|
|
<th>Diff</th>
|
|
</tr>
|
|
{% for b in backups %}
|
|
<tr>
|
|
<td>{{ b.created_at }}</td>
|
|
<td>{{ b.file_path | basename }}</td>
|
|
<td>{{ b.backup_type }}</td>
|
|
<td>
|
|
{# Przy diff potrzebujemy wybrać, do którego backupu porównać #}
|
|
{# Można przygotować prosty select lub link do innej podstrony #}
|
|
{# Dla uproszczenia link do b1=b.id, b2=ostatni? #}
|
|
{# Lub w widoku trzeba by rozwinąć logikę #}
|
|
<!-- Tu tylko pokazujemy, że jest taka opcja: -->
|
|
<small>Diff z innym exportem: np.
|
|
<a href="{{ url_for('diff_view', backup_id1=b.id, backup_id2=backups[0].id if backups|length > 0 else b.id) }}">porównaj z najnowszym</a>
|
|
</small>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endblock %}
|