modified: app.py

modified:   templates/logs.html
This commit is contained in:
SimolZimol
2024-09-03 13:16:18 +02:00
parent e547c6e141
commit d59e1bff21
2 changed files with 34 additions and 0 deletions

View File

@@ -18,6 +18,19 @@
</div>
</div>
</div>
<button class="btn btn-warning mb-3" onclick="archiveLogs()">Archive Logs</button>
<script>
function archiveLogs() {
fetch('{{ url_for("archive_logs") }}', { method: "POST" })
.then(response => response.json())
.then(data => {
alert(data.message);
refreshLogs();
});
}
</script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script>
<script>