Add Analyze Backlog button to WebUI

This commit is contained in:
Richard
2026-07-08 20:18:03 +02:00
parent a4acd23a60
commit 651f8f3ad1
2 changed files with 15 additions and 1 deletions
+4 -1
View File
@@ -195,7 +195,10 @@
<!-- Jobs Page --> <!-- Jobs Page -->
<section class="page" id="page-jobs"> <section class="page" id="page-jobs">
<h1 class="page-title">Background Jobs</h1> <div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;">
<h1 class="page-title" style="margin-bottom:0">Background Jobs</h1>
<button class="btn-sm" onclick="queueBacklogAnalysis()" style="padding:6px 16px; background:var(--accent); color:white; border:none; cursor:pointer; border-radius:4px;">Analyze Backlog (50)</button>
</div>
<div class="card"> <div class="card">
<div class="table-wrap"> <div class="table-wrap">
<table class="data-table"> <table class="data-table">
+11
View File
@@ -616,5 +616,16 @@ async function queueTraderAnalysis(id) {
} }
} }
async function queueBacklogAnalysis() {
const res = await fetch(`/api/jobs/analyze-backlog?take=50`, { method: 'POST' });
if (res.ok) {
const data = await res.json();
alert(`Successfully queued ${data.queued} traders for analysis from backlog.`);
loadJobs();
} else {
alert('Failed to queue backlog analysis.');
}
}
// Initialize Dashboard // Initialize Dashboard
loadDashboard(); loadDashboard();