addes folder backup attachments logging

This commit is contained in:
2026-03-19 15:31:36 +01:00
parent 61c4384111
commit d148248682
29 changed files with 2298 additions and 115 deletions
+30
View File
@@ -24,10 +24,12 @@
<p><strong>Polling:</strong> alle {{ acc.poll_interval_seconds }}s</p>
<p><strong>Letzter Poll:</strong> {{ acc.last_poll_at or "Noch nie" }}</p>
<p><strong>Filterregeln:</strong> {{ acc.filter_rule_count }}</p>
<p><strong>Verarbeitet:</strong> <span id="processed-{{ acc.id }}">...</span> Mails</p>
<footer>
<div role="group">
<button class="outline" onclick="pollNow({{ acc.id }})">Jetzt prüfen</button>
<button class="outline" onclick="testConnection({{ acc.id }})">Verbindungstest</button>
<button class="outline contrast" onclick="resetProcessed({{ acc.id }}, '{{ acc.name }}')">Zurücksetzen</button>
</div>
</footer>
</article>
@@ -71,5 +73,33 @@ async function testConnection(accountId) {
msg.textContent = 'Fehler: ' + e.message;
}
}
async function resetProcessed(accountId, name) {
if (!confirm(`Verarbeitung für "${name}" zurücksetzen?\n\nAlle Mails werden beim nächsten Poll erneut gegen die Filterregeln geprüft.`)) return;
const msg = document.getElementById('status-message');
msg.style.display = 'block';
try {
const resp = await fetch(`/api/accounts/${accountId}/processed`, {method: 'DELETE'});
const data = await resp.json();
msg.textContent = data.message;
loadProcessedCounts();
} catch(e) {
msg.textContent = 'Fehler: ' + e.message;
}
}
async function loadProcessedCounts() {
{% for acc in accounts %}
fetch(`/api/accounts/{{ acc.id }}/processed`)
.then(r => r.json())
.then(d => {
const el = document.getElementById('processed-{{ acc.id }}');
if (el) el.textContent = d.processed_count;
})
.catch(() => {});
{% endfor %}
}
loadProcessedCounts();
</script>
{% endblock %}