updates UI
This commit is contained in:
@@ -94,6 +94,15 @@
|
||||
<h2>Untracked Files <span class="info">(On disk, but not in DB)</span></h2>
|
||||
<div id="untrackedList">No untracked files found.</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Metadata & Pose Deep Backfill <span class="info">(Re-analyze pose, anatomical completeness, gaze, and objects with detailed geometry rules)</span></h2>
|
||||
<div style="display:flex;gap:12px;margin-top:10px">
|
||||
<button class="btn danger" onclick="invalidateMetadata()">Invalidate All Old Metadata</button>
|
||||
<button class="btn success" onclick="triggerBackfill()">Trigger Deep Backfill Now</button>
|
||||
</div>
|
||||
<div id="backfillStatus" style="margin-top:12px;font-size:0.9em;color:#aaa"></div>
|
||||
</div>
|
||||
|
||||
<div class="info" id="timestamp"></div>
|
||||
</div>
|
||||
@@ -240,6 +249,37 @@
|
||||
`).join('');
|
||||
}
|
||||
|
||||
async function invalidateMetadata() {
|
||||
if (!confirm("Are you sure you want to invalidate all earlier metadata? This will clear all calculated completeness/pose/gaze/object details, enabling them to be clean-reprocessed by the background worker or manual backfiller.")) return;
|
||||
try {
|
||||
const r = await fetch(`${API}/images/invalidate-metadata`, { method: 'POST' });
|
||||
const d = await r.json();
|
||||
showToast(d.message || "Metadata invalidated successfully");
|
||||
document.getElementById('backfillStatus').textContent = "All metadata reset. Background idle backfill will now start processing them one by one.";
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
showToast('Failed to invalidate metadata');
|
||||
}
|
||||
}
|
||||
|
||||
async function triggerBackfill() {
|
||||
document.getElementById('backfillStatus').textContent = "Triggering manual deep backfill on all images in background...";
|
||||
try {
|
||||
const r = await fetch(`${API}/images/backfill-metadata`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ force: true })
|
||||
});
|
||||
const d = await r.json();
|
||||
showToast("Deep backfill complete!");
|
||||
document.getElementById('backfillStatus').textContent = `Backfill complete! Processed: ${d.processed}, Failed: ${d.failed}, Total: ${d.total}.`;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
showToast('Backfill failed');
|
||||
document.getElementById('backfillStatus').textContent = "Manual backfill failed or timed out.";
|
||||
}
|
||||
}
|
||||
|
||||
loadInconsistencies();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user