Add Analyze Backlog button to WebUI
This commit is contained in:
@@ -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">
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user