From 651f8f3ad1ec3b4f0ca1b42ceccbde3a3741d97c Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 8 Jul 2026 20:18:03 +0200 Subject: [PATCH] Add Analyze Backlog button to WebUI --- src/Predictalytics.Api/wwwroot/index.html | 5 ++++- src/Predictalytics.Api/wwwroot/js/app.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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();