naprawa błędów i nowe funkcje
This commit is contained in:
@ -22,12 +22,12 @@
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
<!-- Mniejsze przyciski górne -->
|
||||
<form action="{{ url_for('router_export', router_id=router.id) }}" method="POST" class="d-inline">
|
||||
<button type="submit" class="btn btn-primary">Wykonaj /export</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Wykonaj /export</button>
|
||||
</form>
|
||||
<form action="{{ url_for('router_backup', router_id=router.id) }}" method="POST" class="d-inline">
|
||||
<button type="submit" class="btn btn-secondary">Wykonaj backup binarny</button>
|
||||
<button type="submit" class="btn btn-secondary btn-sm">Wykonaj backup binarny</button>
|
||||
</form>
|
||||
<a href="{{ url_for('edit_router', router_id=router.id) }}" class="btn btn-warning">Edytuj ustawienia</a>
|
||||
<a href="{{ url_for('edit_router', router_id=router.id) }}" class="btn btn-warning btn-sm">Edytuj ustawienia</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -50,12 +50,12 @@
|
||||
<!-- Formularz masowych akcji dla eksportów -->
|
||||
<form id="export_mass_actions_form" action="{{ url_for('download_zip') }}" method="POST" class="mb-3">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="submit" name="action" value="download" class="btn btn-lg btn-success">
|
||||
<button type="submit" name="action" value="download" class="btn btn-success btn-sm">
|
||||
<i class="bi bi-file-earmark-zip"></i> Pobierz zaznaczone (.zip)
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- Tabela z eksportami z podzielonymi kolumnami akcji -->
|
||||
<!-- Tabela z eksportami -->
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
@ -87,19 +87,19 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url_for('download_file', filename=b.file_path|basename) }}" class="btn btn-lg btn-info" title="Pobierz">
|
||||
<a href="{{ url_for('download_file', filename=b.file_path|basename) }}" class="btn btn-info btn-sm" title="Pobierz">
|
||||
<i class="bi bi-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url_for('view_export', backup_id=b.id) }}" class="btn btn-lg btn-outline-primary" title="Podgląd">
|
||||
<a href="{{ url_for('view_export', backup_id=b.id) }}" class="btn btn-outline-primary btn-sm" title="Podgląd">
|
||||
<i class="bi bi-eye"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<form action="{{ url_for('send_by_email', backup_id=b.id) }}" method="POST" class="d-inline">
|
||||
<input type="hidden" name="next" value="{{ url_for('router_details', router_id=router.id) }}">
|
||||
<button type="submit" class="btn btn-lg btn-primary" title="Wyślij mailem">
|
||||
<button type="submit" class="btn btn-primary btn-sm" title="Wyślij mailem">
|
||||
<i class="bi bi-envelope"></i>
|
||||
</button>
|
||||
</form>
|
||||
@ -107,7 +107,7 @@
|
||||
<td>
|
||||
<form action="{{ url_for('delete_backup', backup_id=b.id) }}" method="POST" class="d-inline" onsubmit="return confirm('Na pewno usunąć backup?');">
|
||||
<input type="hidden" name="next" value="{{ url_for('router_details', router_id=router.id) }}">
|
||||
<button type="submit" class="btn btn-lg btn-danger" title="Usuń">
|
||||
<button type="submit" class="btn btn-danger btn-sm" title="Usuń">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
@ -130,12 +130,12 @@
|
||||
<!-- Formularz masowych akcji dla backupów binarnych -->
|
||||
<form id="binary_mass_actions_form" action="{{ url_for('download_zip') }}" method="POST" class="mb-3">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="submit" name="action" value="download" class="btn btn-lg btn-success">
|
||||
<button type="submit" name="action" value="download" class="btn btn-success btn-sm">
|
||||
<i class="bi bi-file-earmark-zip"></i> Pobierz zaznaczone (.zip)
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- Tabela z backupami binarnymi z podzielonymi kolumnami akcji -->
|
||||
<!-- Tabela z backupami binarnymi -->
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
@ -155,24 +155,27 @@
|
||||
<td>
|
||||
<input type="checkbox" name="backup_id" value="{{ b.id }}" form="binary_mass_actions_form">
|
||||
</td>
|
||||
<td>{{ b.file_path|basename }}</td>
|
||||
<td>
|
||||
<!-- Dodaj tooltip z sumą kontrolną -->
|
||||
<span data-bs-toggle="tooltip" title="Checksum: {{ b.checksum }}">{{ b.file_path|basename }}</span>
|
||||
</td>
|
||||
<td>{{ b.file_path|filesize }}</td>
|
||||
<td>{{ b.created_at.strftime("%Y-%m-%d %H:%M:%S") }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('download_file', filename=b.file_path|basename) }}" class="btn btn-lg btn-info" title="Pobierz">
|
||||
<a href="{{ url_for('download_file', filename=b.file_path|basename) }}" class="btn btn-info btn-sm" title="Pobierz">
|
||||
<i class="bi bi-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<form action="{{ url_for('upload_backup', router_id=router.id, backup_id=b.id) }}" method="POST" class="d-inline">
|
||||
<button type="submit" class="btn btn-lg btn-secondary" title="Wgraj do routera">
|
||||
<button type="submit" class="btn btn-secondary btn-sm" title="Wgraj do routera">
|
||||
<i class="bi bi-upload"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="{{ url_for('send_by_email', backup_id=b.id) }}" method="POST" class="d-inline">
|
||||
<button type="submit" class="btn btn-lg btn-primary" title="Wyślij mailem">
|
||||
<button type="submit" class="btn btn-primary btn-sm" title="Wyślij mailem">
|
||||
<i class="bi bi-envelope"></i>
|
||||
</button>
|
||||
</form>
|
||||
@ -180,7 +183,7 @@
|
||||
<td>
|
||||
<form action="{{ url_for('delete_backup', backup_id=b.id) }}" method="POST" class="d-inline" onsubmit="return confirm('Na pewno usunąć backup?');">
|
||||
<input type="hidden" name="next" value="{{ url_for('router_details', router_id=router.id) }}">
|
||||
<button type="submit" class="btn btn-lg btn-danger" title="Usuń">
|
||||
<button type="submit" class="btn btn-danger btn-sm" title="Usuń">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
@ -202,15 +205,11 @@
|
||||
<script>
|
||||
document.getElementById('select_all_export').addEventListener('change', function(e) {
|
||||
var checkboxes = document.querySelectorAll('input[name="backup_id"][form="export_mass_actions_form"]');
|
||||
for (var i = 0; i < checkboxes.length; i++) {
|
||||
checkboxes[i].checked = e.target.checked;
|
||||
}
|
||||
checkboxes.forEach(cb => cb.checked = e.target.checked);
|
||||
});
|
||||
document.getElementById('select_all_binary').addEventListener('change', function(e) {
|
||||
var checkboxes = document.querySelectorAll('input[name="backup_id"][form="binary_mass_actions_form"]');
|
||||
for (var i = 0; i < checkboxes.length; i++) {
|
||||
checkboxes[i].checked = e.target.checked;
|
||||
}
|
||||
checkboxes.forEach(cb => cb.checked = e.target.checked);
|
||||
});
|
||||
|
||||
// Inicjalizacja zakładek Bootstrap (jeśli nie są już inicjowane globalnie)
|
||||
@ -222,5 +221,11 @@ triggerTabList.forEach(function (triggerEl) {
|
||||
tabTrigger.show();
|
||||
});
|
||||
});
|
||||
|
||||
// Inicjalizacja tooltipów Bootstrap
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||||
tooltipTriggerList.forEach(function (tooltipTriggerEl) {
|
||||
new bootstrap.Tooltip(tooltipTriggerEl);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user