diff --git a/src/Predictalytics.Api/wwwroot/index.html b/src/Predictalytics.Api/wwwroot/index.html index a20bddc..015d296 100644 --- a/src/Predictalytics.Api/wwwroot/index.html +++ b/src/Predictalytics.Api/wwwroot/index.html @@ -195,7 +195,10 @@
-

Background Jobs

+
+

Background Jobs

+ +
diff --git a/src/Predictalytics.Api/wwwroot/js/app.js b/src/Predictalytics.Api/wwwroot/js/app.js index 5598e21..b0abbb2 100644 --- a/src/Predictalytics.Api/wwwroot/js/app.js +++ b/src/Predictalytics.Api/wwwroot/js/app.js @@ -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 loadDashboard();